Quantcast
Channel: VMware Communities: Message List
Viewing all articles
Browse latest Browse all 229915

Re: Invoke-vmscript (netsh)

$
0
0

No, we have to force the DnsServerSearchOrder property to be an array.

Try like this

 

$shownet=@'

$net = get-wmiobject win32_networkadapterconfiguration

"{0}|{1}|{2}" -f @(($net | where{$_.IPaddress} | select -expandproperty IPAddress | where{$_ -notmatch ':'}),

                       @($net | where{$_.dnsserversearchorder} | select -expandproperty dnsserversearchorder)[0],

                       @($net | where{$_.dnsserversearchorder} | select -expandproperty dnsserversearchorder)[1])

'@


Viewing all articles
Browse latest Browse all 229915

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>