Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #### Get Azure VM Private IP
- $ResourceGroup = "myRG" ### Resource group name
- $VMName = "myVM" ### VM Name, example VDI-Master
- $nic = Get-AzureRmNetworkInterface -name $VMname -ResourceGroupName $ResourceGroup
- $AzureIP = $nic.IpConfigurations.privateIpAddress
- Write-host "The VM $VMname has IP Address $AzureIP"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement