我尝试使用Powershell在Windows 10,raspberry pi 2上设置DNS设置:
Set-DNSClientServerAddress –InterfaceIndex <number> -ServerAddresses DNS1-IP,DNS2-IP
但是我收到以下错误:
术语&#39; Set-DNSClientServerAddress&#39;不被认为是的名称 cmdlet CommandNotFoundException
如何成功完成DNS设置?
答案 0 :(得分:0)
我还没有尝试过Windows 10的IoT版本,但是Powershell cmdlet可能有限吗?
但是,您也可以尝试设置DNS using the Get-WmiObject cmdlet:
$wmi = Get-WmiObject win32_networkadapterconfiguration -filter "ipenabled = 'true'"
$wmi.SetDNSServerSearchOrder('DNS1-IP','DNS2-IP')