How would you determine the virtual network type (external or internal) from an hyper-v virtual host ?
My goal is to activate DHCP for internal network and static ip for external network.
Activating or disabling dhcp from powershell is not a problem like shown on the scripting guy blog
problem solved with a really simple solution : try to ping an external host
if( (test-connection -quiet <external_IP_address>) -eq $false){
#private network, allow DHCP
}
else{
#set static ip address
}