Sign in
Home
Library
Wiki
Learn
Gallery
Downloads
Support
Forums
Blogs
Resources For IT Professionals
United States (English)
Россия (Pусский)
中国(简体中文)
Brasil (Português)
Skip to locale bar
Page Details
First published by
Hari VS_Kid
When:
16 May 2019 5:30 AM
Last revision by
Hari VS_Kid
When:
16 May 2019 5:30 AM
Revisions:
3
Comments:
1
Options
Revision #1
Wiki
>
TechNet Articles
>
Powershell - Finding IP of VM from Azure portal (AZ Module)
>
Revision #1
Powershell - Finding IP of VM from Azure portal (AZ Module)
You are currently reviewing an older revision of this page.
Go to current version
How to find the private IP address of VM in AZ Module
Step 1: Find your VM details
$VM = Get-AzVm -name "Your VM Name"
Step 2: Set the NetworkInterface Profile to a variable. The NeworkInterfaceID will be having a value separated by "/" and profile name at the end.
$Profile =$VM.NetworkProfile.NetworkInterfaces.Id.Split("/") | Select -Last 1
Step 3: From ProfileName we will fetch the networkinterface details to a variable
$IPConfig = Get-AzNetworkInterface -Name $Profile
Step 4: The following will have the Private IP address value configured for the specific VM
$IPAddress = $IPConfig.IpConfigurations.PrivateIpAddress
Note: If multiple NIC are attached to a VM, you will have to loop in Step 2