Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

Get-AzPublicIpAddress

Gets a public IP address.

Syntax

NoExpandStandAloneIp (Default)

Get-AzPublicIpAddress
 [-Name <String>]
 [-ResourceGroupName <String>]
 [-DefaultProfile <IAzureContextContainer>]
 [<CommonParameters>]

ExpandStandAloneIp

Get-AzPublicIpAddress
 -Name <String>
 -ResourceGroupName <String>
 -ExpandResource <String>
 [-DefaultProfile <IAzureContextContainer>]
 [<CommonParameters>]

NoExpandScaleSetIp

Get-AzPublicIpAddress
 -ResourceGroupName <String>
 [-Name <String>]
 [-VirtualMachineScaleSetName <String>]
 [-VirtualMachineIndex <String>]
 [-NetworkInterfaceName <String>]
 [-IpConfigurationName <String>]
 [-DefaultProfile <IAzureContextContainer>]
 [<CommonParameters>]

ExpandScaleSetIp

Get-AzPublicIpAddress
 -Name <String>
 -ResourceGroupName <String>
 -VirtualMachineScaleSetName <String>
 -VirtualMachineIndex <String>
 -NetworkInterfaceName <String>
 -IpConfigurationName <String>
 -ExpandResource <String>
 [-DefaultProfile <IAzureContextContainer>]
 [<CommonParameters>]

Description

The Get-AzPublicIPAddress cmdlet gets one or more public IP addresses in a resource group.

Examples

Example 1: Get a public IP resource

Get-AzPublicIpAddress -Name myPublicIp1 -ResourceGroupName myRg
Name : myPublicIp1
ResourceGroupName : myRg
Location : westus2
Id : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRg/providers/Microsoft
 .Network/publicIPAddresses/myPublicIp1
Etag : W/"00000000-0000-0000-0000-000000000000"
ResourceGuid : 00000000-0000-0000-0000-000000000000
ProvisioningState : Succeeded
Tags :
PublicIpAllocationMethod : Dynamic
IpAddress : Not Assigned
PublicIpAddressVersion : IPv4
IdleTimeoutInMinutes : 4
IpConfiguration : {
 "Id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRg/providers/
 Microsoft.Network/networkInterfaces/ps-azure-env407/ipConfigurations/ipconfig1"
 }
DnsSettings : null
Zones : {}
Sku : {
 "Name": "Basic",
 "Tier": "Regional"
 }
IpTags : []

This command gets a public IP address resource with name myPublicIp in the resource group myRg.

Example 2: Get public IP resources using filtering

Get-AzPublicIpAddress -Name myPublicIp*
Name : myPublicIp1
ResourceGroupName : myRg
Location : westus2
Id : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRg/providers/Microsoft
 .Network/publicIPAddresses/myPublicIp1
Etag : W/"00000000-0000-0000-0000-000000000000"
ResourceGuid : 00000000-0000-0000-0000-000000000000
ProvisioningState : Succeeded
Tags :
PublicIpAllocationMethod : Dynamic
IpAddress : Not Assigned
PublicIpAddressVersion : IPv4
IdleTimeoutInMinutes : 4
IpConfiguration : {
 "Id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRg/providers/
 Microsoft.Network/networkInterfaces/ps-azure-env407/ipConfigurations/ipconfig1"
 }
DnsSettings : null
Zones : {}
Sku : {
 "Name": "Basic",
 "Tier": "Regional"
 }
IpTags : []

This command gets all public IP address resources whose name starts with myPublicIp.

Parameters

-DefaultProfile

The credentials, account, tenant, and subscription used for communication with azure.

Parameter properties

Type:IAzureContextContainer
Default value:None
Supports wildcards:False
DontShow:False
Aliases:AzContext, AzureRmContext, AzureCredential

Parameter sets

-ExpandResource

The Get-AzPublicIPAddress cmdlet gets one or more public IP addresses in a resource group.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-IpConfigurationName

Network Interface IP Configuration Name.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-Name

Specifies the name of the public IP address that this cmdlet gets.

Parameter properties

Type:String
Default value:None
Supports wildcards:True
DontShow:False
Aliases:ResourceName

Parameter sets

-NetworkInterfaceName

Virtual Machine Network Interface Name.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-ResourceGroupName

Specifies the name of the resource group that contains the public IP address that this cmdlet gets.

Parameter properties

Type:String
Default value:None
Supports wildcards:True
DontShow:False

Parameter sets

-VirtualMachineIndex

Virtual Machine Index.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-VirtualMachineScaleSetName

Virtual Machine Scale Set Name.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Inputs

String

Outputs

PSPublicIpAddress

Related Links


Feedback

Was this page helpful?