$wmi = Get-WmiObject -Class Win32_NetworkAdapter -Filter "netconnectionstatus=2" $wmi.NetConnectionID = 'iEthernet' $wmi.Put()