Set-AzLocalNetworkGateway
語法
Set-AzLocalNetworkGateway
-LocalNetworkGateway <PSLocalNetworkGateway>
[-AddressPrefix <String[]>]
[-Asn <UInt32>]
[-BgpPeeringAddress <String>]
[-PeerWeight <Int32>]
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
Set-AzLocalNetworkGateway Cmdlet 會修改局域網路網關。
範例
範例 1
設定現有閘道的組態
$lgw = Get-AzLocalNetworkGateway -Name myLocalGW -ResourceGroupName myRG
Set-AzLocalNetworkGateway -LocalNetworkGateway $lgw
Name : myLocalGW
ResourceGroupName : TestRG1
Location : westus
Id : /subscriptions/81ab786c-56eb-4a4d-bb5f-f60329772466/resourceGroups/TestRG1/providers/Microso
ft.Network/localNetworkGateways/myLocalGW
Etag : W/"d2de6968-315e-411d-a4b8-a8c335abe61b"
ResourceGuid : 393acf8b-dbb8-4b08-a9ea-c714570710e1
ProvisioningState : Succeeded
Tags :
GatewayIpAddress : 1.2.3.4
LocalNetworkAddressSpace : {
"AddressPrefixes": []
}
BgpSettings : null
參數
-AddressPrefix
類型: | String[] |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | True |
接受萬用字元: | False |
-AsJob
在背景執行 Cmdlet
類型: | SwitchParameter |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-Asn
類型: | UInt32 |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | True |
接受萬用字元: | False |
-BgpPeeringAddress
類型: | String |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | True |
接受萬用字元: | False |
-DefaultProfile
用於與 azure 通訊的認證、帳戶、租用戶和訂用帳戶。
類型: | IAzureContextContainer |
別名: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-LocalNetworkGateway
-PeerWeight
類型: | Int32 |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | True |
接受萬用字元: | False |
PSLocalNetworkGateway
String[]
UInt32
String
Int32
輸出
PSLocalNetworkGateway