Saturday, July 31, 2021

Hyper-v integration with Debian: how to get IP address via powershell

For powershell query to obtain network adapter information of the Debian Buster vm I've installed,

I need to install hyper-v daemon 


```sudo apt-get install hyperv-daemon```


Powershell will be able to query the network information  once it's installed in the guest.

get-vm | ?{$_.State -eq "Running"} | select -ExpandProperty networkadapters | select vmname, macaddress, switchname, ipaddresses


VMName   MacAddress   SwitchName     IPAddresses

------   ----------   ----------     -----------

buildVM 00155D7B6A07 Default Switch {172.25.28.124, fe80::215:5df0:f37b:6a07}