Set DNS settings on Windows 10 Raspberry Pi 2

511 views Asked by At

I try to set DNS settings on windows 10, raspberry pi 2 using Powershell:

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

But I receive the following error:

The term 'Set-DNSClientServerAddress' is not recognized as the name of a cmdlet CommandNotFoundException

How can you succeed the DNS settings?

1

There are 1 answers

0
Martin Brandl On

I didn't tryed the IoT Version of Windows 10 yet but maybe the Powershell cmdlets are limited?

However, you could also try to set the DNS using the Get-WmiObject cmdlet:

$wmi = Get-WmiObject win32_networkadapterconfiguration -filter "ipenabled = 'true'"
$wmi.SetDNSServerSearchOrder('DNS1-IP','DNS2-IP')