Share via


Resolve-DNSName cmdlet missing

Question

Tuesday, July 19, 2016 11:54 AM

HI

I've just installed a new 2016 Nano server TP5 on WIndows Hyper-V 2012R2. When trying to use REsolve-DNSName prioro to domain add it just errors with;

The term 'resolve-dnsname' is not recognized as the name of a cmdlet, function, script file, or operable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

Listing the cmdlets with get-command -commandtype cmdlet doesn't reveal it as available.

this cannot be to hard, what am I missing???

thanks for help

Christopher

All replies (8)

Friday, August 19, 2016 7:37 AM âś…Answered

Hi,

Considering TP5 is a preview version, and I don't find any official document about this behavior,please wait for next update,or you could  go to  the Windows Server User Voice site to give feedback,thank you.

________________________________________
Best Regards,
Cartman
Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Support, contact [email protected].


Wednesday, July 20, 2016 3:16 AM

Hi,

This issue can occur if the DNSclient Module for Windows PowerShell isn't loaded correctly.

Please use 'get-module' to check if 'dnsclient' is loaded.

And use 'import-module dnsclient' to import it if you need.

If it fails please check (%Windir%\System32\WindowsPowerShell\v1.0\Modules\Dnsclient).Maybe missing files or corrupted.

If this doesn't help,you maight want to post your query in powershell forum for further assistance:

https://social.technet.microsoft.com/Forums/windows/en-US/home?forum=winserverpowershell

________________________________________
Best Regards,
Cartman
Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Support, contact [email protected].


Wednesday, July 20, 2016 11:37 AM

Thanks for the insight Cartman. The DNSClient module was not loaded so I imported it. The Resolve-DNSName still returned an error so the dnsclient module was checked. This is part of the DNSClient.psd1 file;

   FunctionsToExport = @(
        "Clear-DnsClientCache",
        "Get-DnsClient",
        "Get-DnsClientCache",
        "Get-DnsClientGlobalSetting",
        "Get-DnsClientServerAddress",
        "Register-DnsClient",
        "Set-DnsClient",
        "Set-DnsClientGlobalSetting",
        "Set-DnsClientServerAddress"
       )

Clear-DNSCahhe works fine as do  the Get-DNS* cmdlets. Still no Resolve-DNSName though, perhaps it's being replaced???

regards

Christopher


Friday, July 22, 2016 2:33 AM

Hi,

This is from my test server:

Please try to remove and reinstall windows powershell feature.

________________________________________
Best Regards,
Cartman
Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Support, contact [email protected].


Wednesday, July 27, 2016 11:49 AM

Hi

I wasn't able to remove the Powershell feature from the Nano server like Windows 2008r2 /2012r2. So I copied the files from the DNSClient module on a TP5 server with full GUI (where it works) to the Nano server (there were extra files in the Full server) imported the DNSClient module and tried REsolve-DNSName.

It still doesn't work even though the DnsClinet.psd1 file looks the same as the TP5 server. It took a reboot of the Nano server to get it functional.

I'll try building another Nano server and see if it has the same issue. It's very strange that there wa so much missing from that folder.

Before copying the files from TP5 server:

[2016-nano]: PS C:\Windows\System32\WindowsPowerShell\v1.0\modules\DnsClient> dir

    Directory: C:\Windows\System32\WindowsPowerShell\v1.0\modules\DnsClient

Mode                LastWriteTime         Length Name
                       
-a       25/03/2016   3:17 AM           1087 DnsClient.psd1
-a       25/03/2016   3:17 AM          20344 DnsConfig.Format.ps1xml
-a       25/03/2016   3:17 AM           1100 DnsConfig.Types.ps1xml
-a       25/03/2016   3:17 AM           4504 MSFT_DnsClient.cdxml
-a       25/03/2016   3:17 AM           4130 MSFT_DnsClientCache.cdxml
-a       25/03/2016   3:17 AM           1306 MSFT_DnsClientGlobalSetting.cdxml
-a       25/03/2016   3:17 AM           3613 MSFT_DnsClientServerAddress.cdxml

Files after copy, the DnsClient.pds1file had to be renamed before the copy as it won't overwrite:

[2016-nano]: PS C:\Windows\System32\WindowsPowerShell\v1.0\modules\DnsClient> dir

    Directory: C:\Windows\System32\WindowsPowerShell\v1.0\modules\DnsClient

Mode                LastWriteTime         Length Name
                       
-a       25/03/2016   3:17 AM           1087 DnsClient.psd1
-a       25/03/2016   4:24 AM          17850 DnsClientPSProvider.Format.ps1xml
-a       25/03/2016   4:24 AM           4788 DnsClientPSProvider.Types.ps1xml
-a       25/03/2016   4:24 AM          61640 DnsCmdlets.Format.ps1xml
-a       25/03/2016   4:24 AM          22151 DnsCmdlets.Types.ps1xml
-a       25/03/2016   3:17 AM          20344 DnsConfig.Format.ps1xml
-a       25/03/2016   3:17 AM           1100 DnsConfig.Types.ps1xml
-a       25/03/2016   4:24 AM          39936 dnslookup.dll
-a       25/03/2016   3:17 AM           4504 MSFT_DnsClient.cdxml
-a       25/03/2016   3:17 AM           4130 MSFT_DnsClientCache.cdxml
-a       25/03/2016   3:17 AM           1306 MSFT_DnsClientGlobalSetting.cdxml
-a       25/03/2016   3:17 AM           3613 MSFT_DnsClientServerAddress.cdxml
-a       25/03/2016   4:24 AM           5188 PS_DnsClientNRPTGlobal_v1.0.0.cdxml
-a       25/03/2016   4:24 AM           1704 PS_DnsClientNrptPolicy_v1.0.0.cdxml
-a       25/03/2016   4:24 AM          18650 PS_DnsClientNRPTRule_v1.0.0.cdxml

Thanks for your help Cartman


Thursday, July 28, 2016 5:50 AM

Hi,

>>I'll try building another Nano server and see if it has the same issue.

Let us know if you get something new.________________________________________
Best Regards,
Cartman
Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Support, contact [email protected].


Thursday, August 18, 2016 11:16 AM

Hi

I've just built another nanoserver from scratch and it has exactly the same symptoms as above. I've downloaded the nanoserver.vhdx from the TechNet Previews site will create another vm and try that.

C..........


Thursday, August 18, 2016 11:37 AM

The nanotechpreview VHD from Microsoft's TechNet Evaluation Center is also giving the same error with Resolve-DNSName in Nano server 2016 TP5.

Is anyone else experiencing this with Nano server? the DNSClient module doesn't 'auto import' like the Windows2012R2 modules when using cmdlets from the module. And as stated after imprting the module, Resolve-DNSName is unrecognized as a cmdlet. Copying the files from a Full install of Server 2016 TP5 doesn't solve the issue either.

Can someone from Microsoft elaborate??

Thanks