Get Hyper-V VMs IP addresses



    column 1 "vmname" "macaddress" "switchname" "ipaddresses"

    This code reads the running state of all VMs and prints the name, MAC address, and switch name for each VM, as well as the IP addresses assigned to it.

    get-vm | ?{$_.State -eq "Running"} | select -ExpandProperty networkadapters | select vmname, macaddress, switchname, ipaddresses | ft -wrap -
    Codiga Logo
    Codiga Hub
    • Rulesets
    • Playground
    • Snippets
    • Cookbooks
    soc-2 icon

    We are SOC-2 Compliance Certified

    G2 high performer medal

    Codiga – All rights reserved 2022.