Get VMs with net adapter not connected

This post was originally published on this site

Hi all,

I’m trying to get all the VMs that are “connected” state(to exclude maintenance mode ones) and the “Connect at power on” network adapter setting disabled.

This is what I have but seems to be not working properly Im not getting any result even when I know there are VMs with this setting disabled:



Get-VM | Get-NetworkAdapter | Where-object {($_.ConnectionState.Connected ) -and ($_.ConnectionState.StartConnected -ne “True”)}


Any idea?

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.