当我尝试使用 DNS cmdlet 时,出现“无法识别”错误...
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
Run Code Online (Sandbox Code Playgroud)
如何将这些功能导入 Windows 10?
如果您使用的是 Windows 10 等非服务器操作系统,则可以在此处下载远程服务器管理工具...
https://www.microsoft.com/en-us/download/confirmation.aspx?id=45520
该*-dnsserver*
cmdlet的将立即启动已安装包后在本地机器上在PowerShell中的工作。
您也可以使用隐式远程处理,在不安装 RSAT 的情况下临时导入远程命令:
$session = new-pssession -ComputerName server
Invoke-Command -command {Import-Module dnsserver} -Session $session
Import-PSSession -Session $session -Module dnsserver -Prefix RemoteDNS
Run Code Online (Sandbox Code Playgroud)
前缀将标记导入的命令,以便您可以跟踪远程命令。导入命令后,您可以使用名词前的前缀来运行它们。
例如:
Get-RemoteDNSdnsserverresourcerecord
代替 get-dnsserverresourcerecord
但是,前缀是可选的。
归档时间: |
|
查看次数: |
9753 次 |
最近记录: |