Set-AzPublicIpPrefix
設定現有 PublicIpPrefix 的標記
PowerShell
Set-AzPublicIpPrefix
-PublicIpPrefix <PSPublicIpPrefix>
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Set-AzPublicIpPrefix Cmdlet 會設定公用 IP 前置詞的標籤。
PowerShell
$publicIpPrefix = Get-AzPublicIpPrefix -Name $prefixName -ResourceGroupName $rgName
$publicIpPrefix.Tags = "TestTag"
Set-AzPublicIpPrefix -PublicIpPrefix $publicIpPrefix
第一個命令會取得現有的公用IP前置詞,第二個命令會設定Tags屬性,而第三個命令會更新現有的物件。
在背景執行 Cmdlet
類型: | SwitchParameter |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
在執行 Cmdlet 之前,提示您進行確認。
類型: | SwitchParameter |
別名: | cf |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
用於與 Azure 通訊的認證、帳戶、租用戶和訂用帳戶。
類型: | IAzureContextContainer |
別名: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
The PublicIpPrefix
類型: | PSPublicIpPrefix |
Position: | Named |
預設值: | None |
必要: | True |
接受管線輸入: | True |
接受萬用字元: | False |
顯示 Cmdlet 執行時會發生什麼事。 Cmdlet 未執行。
類型: | SwitchParameter |
別名: | wi |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |