VMware Cloud Community
inderraw
Contributor
Contributor

Disconnect power of vm network card via script

Hi Team,

how to disconnect (uncheck network) multiple power off vm network card via power cli script?

0 Kudos
2 Replies
AVillodre
Contributor
Contributor

I'm not proficient (yet) with Power CLI but perhaps the syntax used in this thread may help you?
https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/Script-for-disconnecting-the-network-a...

Tags (1)
0 Kudos
88kpow
Contributor
Contributor

Have you tried Get-VM | Where-Object {$_.Name -eq "<VM Name>"} | Get-NetworkAdapter | Set-NetworkAdpater -connected:$false

88kpow
0 Kudos