1

When I try to use a DNS cmdlet, I get a "not recognized" error...

PS C:\Users\josh\Documents\GitHub\GoDaddy> get-dnsserverresourcerecord
get-dnsserverresourcerecord : The term 'get-dnsserverresourcerecord' 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.
At line:1 char:1
+ get-dnsserverresourcerecord
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (get-dnsserverresourcerecord:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

How do I import these functions into Windows 10?

5

If you are using a non-server OS like Windows 10, you can download the Remote Server Admin Tools here...

https://www.microsoft.com/en-us/download/confirmation.aspx?id=45520

The *-dnsserver* cmdlets will immediately start working in PowerShell after that package is installed on the local machine.

| improve this answer | |
4

You can use implicit remoting as well, to temporarily import remote commands without installing RSAT:

$session = new-pssession -ComputerName server
Invoke-Command -command {Import-Module dnsserver} -Session $session
Import-PSSession -Session $session -Module dnsserver -Prefix RemoteDNS

The prefix will tag the imported commands so you can keep track of the remote commands. Once you import the commands, you run them by using the prefix prior to the noun.

For example:

Get-RemoteDNSdnsserverresourcerecord instead of get-dnsserverresourcerecord

The prefix is optional, however.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.