【问题标题】:Set DNS settings on Windows 10 Raspberry Pi 2在 Windows 10 Raspberry Pi 2 上设置 DNS 设置
【发布时间】:2015-06-17 04:49:48
【问题描述】:

我尝试使用 Powershell 在 Windows 10、树莓派 2 上设置 DNS 设置:

Set-DNSClientServerAddress –InterfaceIndex <number> -ServerAddresses DNS1-IP,DNS2-IP

但我收到以下错误:

“Set-DNSClientServerAddress”一词未被识别为 一个 cmdlet CommandNotFoundException

如何才能使 DNS 设置成功?

【问题讨论】:

    标签: powershell dns windows-10 raspberry-pi2


    【解决方案1】:

    我还没有尝试过 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')
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-11-14
      • 2020-10-02
      • 1970-01-01
      • 1970-01-01
      • 2022-11-06
      • 2013-11-10
      相关资源
      最近更新 更多