Get-AzPublicIpAddress
Mendapatkan alamat IP publik.
Sintaks
Get-AzPublicIpAddress
[-Name <String>]
[-ResourceGroupName <String>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Get-AzPublicIpAddress
-Name <String>
-ResourceGroupName <String>
-ExpandResource <String>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Get-AzPublicIpAddress
[-Name <String>]
-ResourceGroupName <String>
[-VirtualMachineScaleSetName <String>]
[-VirtualMachineIndex <String>]
[-NetworkInterfaceName <String>]
[-IpConfigurationName <String>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Get-AzPublicIpAddress
-Name <String>
-ResourceGroupName <String>
-VirtualMachineScaleSetName <String>
-VirtualMachineIndex <String>
-NetworkInterfaceName <String>
-IpConfigurationName <String>
-ExpandResource <String>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Deskripsi
Cmdlet Get-AzPublicIPAddress mendapatkan satu atau beberapa alamat IP publik dalam grup sumber daya.
Contoh
Contoh 1: Mendapatkan sumber daya IP publik
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 : []
Perintah ini mendapatkan sumber daya alamat IP publik dengan nama myPublicIp di grup sumber daya myRg.
Contoh 2: Mendapatkan sumber daya IP publik menggunakan pemfilteran
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 : []
Perintah ini mendapatkan semua sumber daya alamat IP publik yang namanya dimulai dengan myPublicIp.
Parameter
-DefaultProfile
Kredensial, akun, penyewa, dan langganan yang digunakan untuk komunikasi dengan azure.
Jenis: | IAzureContextContainer |
Alias: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
Nilai default: | None |
Diperlukan: | False |
Terima input alur: | False |
Terima karakter wildcard: | False |
-ExpandResource
Jenis: | String |
Position: | Named |
Nilai default: | None |
Diperlukan: | True |
Terima input alur: | True |
Terima karakter wildcard: | False |
-IpConfigurationName
Nama Konfigurasi IP Antarmuka Jaringan.
Jenis: | String |
Position: | Named |
Nilai default: | None |
Diperlukan: | True |
Terima input alur: | True |
Terima karakter wildcard: | False |
-Name
Menentukan nama alamat IP publik yang didapat cmdlet ini.
Jenis: | String |
Alias: | ResourceName |
Position: | Named |
Nilai default: | None |
Diperlukan: | True |
Terima input alur: | True |
Terima karakter wildcard: | True |
-NetworkInterfaceName
Nama Antarmuka Jaringan Komputer Virtual.
Jenis: | String |
Position: | Named |
Nilai default: | None |
Diperlukan: | True |
Terima input alur: | True |
Terima karakter wildcard: | False |
-ResourceGroupName
Menentukan nama grup sumber daya yang berisi alamat IP publik yang didapat cmdlet ini.
Jenis: | String |
Position: | Named |
Nilai default: | None |
Diperlukan: | True |
Terima input alur: | True |
Terima karakter wildcard: | True |
-VirtualMachineIndex
Indeks Komputer Virtual.
Jenis: | String |
Position: | Named |
Nilai default: | None |
Diperlukan: | True |
Terima input alur: | True |
Terima karakter wildcard: | False |
-VirtualMachineScaleSetName
Nama Set Skala Komputer Virtual.
Jenis: | String |
Position: | Named |
Nilai default: | None |
Diperlukan: | True |
Terima input alur: | True |
Terima karakter wildcard: | False |
Input
Output
Link Terkait
Azure PowerShell