共用方式為


Set-AzNetworkManagerConnectivityConfiguration

更新連線設定。

語法

Set-AzNetworkManagerConnectivityConfiguration
   -InputObject <PSNetworkManagerConnectivityConfiguration>
   [-AsJob]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

Set-AzNetworkManagerConnectivityConfiguration Cmdlet 會更新連線設定。

範例

範例 1

$ConnectivityConfiguration = Get-AzNetworkManagerConnectivityConfiguration -Name "psConnectivityConfig" -NetworkManagerName "psNetworkManager" -ResourceGroupName "psResourceGroup"
$connectivityGroupItem = New-AzNetworkManagerConnectivityGroupItem -NetworkGroupId "/subscriptions/f0dc2b34-dfad-40e4-83e0-2309fed8d00b/resourceGroups/psResourceGroup/providers/Microsoft.Network/networkManagers/psNetworkManager/networkGroups/psNetworkGroup"
$connectivityGroupItem2 = New-AzNetworkManagerConnectivityGroupItem -NetworkGroupId "/subscriptions/f0dc2b34-dfad-40e4-83e0-2309fed8d00b/resourceGroups/psResourceGroup/providers/Microsoft.Network/networkManagers/psNetworkManager/networkGroups/psNetworkGroup2"
[System.Collections.Generic.List[Microsoft.Azure.Commands.Network.Models.NetworkManager.PSNetworkManagerConnectivityGroupItem]]$connectivityGroup  = @()  
$connectivityGroup.Add($connectivityGroupItem)
$connectivityGroup.Add($connectivityGroupItem2)
$ConnectivityConfiguration.AppliesToGroups = $connectivityGroup
Set-AzNetworkManagerConnectivityConfiguration -InputObject $ConnectivityConfiguration

ConnectivityTopology  : HubAndSpoke
Hubs                  : {/subscriptions/0fd190fa-dd1c-4724-b7f6-c5cc3ba5c884/resourceGroups/jaredgorthy-PowerShellTestResources/providers/Microsoft.Network/virtualNetworks/powerShellTestVnetHub}
DeleteExistingPeering : True
IsGlobal              : False
AppliesToGroups       : {/subscriptions/f0dc2b34-dfad-40e4-83e0-2309fed8d00b/resourceGroups/psResourceGroup/providers/Microsoft.Network/networkManagers/psNetworkManager/networkGroups/psNetworkGroup,
                        /subscriptions/f0dc2b34-dfad-40e4-83e0-2309fed8d00b/resourceGroups/psResourceGroup/providers/Microsoft.Network/networkManagers/psNetworkManager/networkGroups/psNetworkGroup2}
AppliesToGroupsText   : [
                          {
                            "NetworkGroupId":
                        "/subscriptions/f0dc2b34-dfad-40e4-83e0-2309fed8d00b/resourceGroups/psResourceGroup/providers/Microsoft.Network/networkManagers/psNetworkManager/networkGroups/psNetworkGroup",
                            "UseHubGateway": "False",
                            "IsGlobal": "False",
                            "GroupConnectivity": "None"
                          },
                          {
                            "NetworkGroupId":
                        "/subscriptions/f0dc2b34-dfad-40e4-83e0-2309fed8d00b/resourceGroups/psResourceGroup/providers/Microsoft.Network/networkManagers/psNetworkManager/networkGroups/psNetworkGroup2",
                            "UseHubGateway": "False",
                            "IsGlobal": "False",
                            "GroupConnectivity": "None"
                          }
                        ]
HubsText              : [
                          {
                            "ResourceId": "/subscriptions/0fd190fa-dd1c-4724-b7f6-c5cc3ba5c884/resourceGroups/jaredgorthy-PowerShellTestResources/providers/Microsoft.Network/virtualNetworks/powerShellTestVnetHub",
                            "ResourceType": "Microsoft.Network/virtualNetworks"
                          }
                        ]
DisplayName           :
Description           :
Type                  : Microsoft.Network/networkManagers/connectivityConfigurations
ProvisioningState     : Succeeded
SystemData            : Microsoft.Azure.Commands.Network.Models.NetworkManager.PSSystemData
SystemDataText        : {
                          "CreatedBy": "jaredgorthy@microsoft.com",
                          "CreatedByType": "User",
                          "CreatedAt": "2022-08-07T04:37:43.1186543Z",
                          "LastModifiedBy": "jaredgorthy@microsoft.com",
                          "LastModifiedByType": "User",
                          "LastModifiedAt": "2022-08-08T00:58:41.1751638Z"
                        }
Name                  : psConnectivityConfig
Etag                  :
Id                    : /subscriptions/f0dc2b34-dfad-40e4-83e0-2309fed8d00b/resourceGroups/psResourceGroup/providers/Microsoft.Network/networkManagers/psNetworkManager/connectivityConfigurations/psConnectivityConfig

更新連線設定的群組成員。

參數

-AsJob

在背景執行 Cmdlet

類型:SwitchParameter
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-Confirm

執行 Cmdlet 之前先提示您確認。

類型:SwitchParameter
別名:cf
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-DefaultProfile

用於與 Azure 通訊的認證、帳戶、租用戶和訂用帳戶。

類型:IAzureContextContainer
別名:AzContext, AzureRmContext, AzureCredential
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-InputObject

The NetworkManagerConnectivityConfiguration

類型:PSNetworkManagerConnectivityConfiguration
Position:Named
預設值:None
必要:True
接受管線輸入:True
接受萬用字元:False

-WhatIf

顯示執行 Cmdlet 後會發生的情況。 未執行 Cmdlet。

類型:SwitchParameter
別名:wi
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

輸入

String

PSNetworkManagerConnectivityConfiguration

輸出

PSNetworkManagerConnectivityConfiguration