@ris
You can’t do that because you’re creating local variables and expecting the remote computer to know something about them. If you’re using PS 3.0 or greater (on your local computer), then use the Using scope modifier.

In this case, version is irrelevant. Windows 8/Server 2012 and higher come with additional modules of advanced functions to help manage the OS. They are not integrated Powershell Cmdlets.

You can use WMI to so the same thing. If you know your Interface Index, you could use this:
$NetworkAdapterConfig = Get-WMIObject -Class Win32_NetworkAdapterConfiguration -Filter {Index = 12}
$NetworkAdapterConfig.DNSServerSearchOrder = “10.0.0.1”,”10.0.0.2”

This is Version 2 safe and should work on any Windows OS (XP or above). Please note that this uses WMI and is not networking friendly. I would sugest running this inside of a PSSession of some kind if you are setting this remotely.