Get Virtual Machine IP address using PowerShell

To get IP address of windows OS based virtual machines on hyper-v hosts, use below command:

Get-VM | Select -ExpandProperty NetworkAdapters | Select VMName, IPAddresses, Status

which should generate an output like below:

VMName IPAddresses Status

CentOS {} {Ok}
Jenkins {, fe80::8165:58b5:fc92:3cd3} {Ok}

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s