VMware Cloud Community
mischief3000
Contributor
Contributor

script/command to show all network and subnet status

Hey All,

I need help if anyone knows the script/command to show all network and subnet status and change every VM to correct subnet if possible

I been looking around but cant findd the answer

Thanks

0 Kudos
1 Reply
GrantOrchardVMw
Commander
Commander

Hi,

What operating system are the VMs running?

The Get-VMGuestNetworkInterface (http://www.vmware.com/support/developer/PowerCLI/PowerCLI41/html/Get-VMGuestNetworkInterface.html) and the related Set-VMGuestInterface cmdlets would work if you are using compatible OS.

Something like

get-vm | % { set-vmguestnetworkinterface -hostuser $hostuser -hostpassword $hostpassword `

-guestuser $guestuser -guestpassword $guestpassword -Netmask $Netmask
}

Grant

Grant http://grantorchard.com
0 Kudos