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?