Upravit

Sdílet prostřednictvím


New-AzNetworkManagerConnectivityConfiguration

Creates a network manager connectivity configuration.

Syntax

New-AzNetworkManagerConnectivityConfiguration
   -Name <String>
   -NetworkManagerName <String>
   -ResourceGroupName <String>
   -AppliesToGroup <PSNetworkManagerConnectivityGroupItem[]>
   -ConnectivityTopology <String>
   [-Description <String>]
   [-Hub <PSNetworkManagerHub[]>]
   [-DeleteExistingPeering]
   [-IsGlobal]
   [-Force]
   [-AsJob]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

The New-AzNetworkManagerConnectivityConfiguration cmdlet creates a network manager connectivity configuration.

Examples

Example 1

$connectivityGroupItem = New-AzNetworkManagerConnectivityGroupItem -NetworkGroupId "/subscriptions/f0dc2b34-dfad-40e4-83e0-2309fed8d00b/resourceGroups/psResourceGroup/providers/Microsoft.Network/networkManagers/psNetworkManager/networkGroups/psNetworkGroup"
$connectivityGroup  = @($connectivityGroupItem)  

$hub = New-AzNetworkManagerHub -ResourceId "/subscriptions/0fd190fa-dd1c-4724-b7f6-c5cc3ba5c884/resourceGroups/jaredgorthy-PowerShellTestResources/providers/Microsoft.Network/virtualNetworks/powerShellTestVnetHub" -ResourceType "Microsoft.Network/virtualNetworks" 
$hubList = @($hub)
New-AzNetworkManagerConnectivityConfiguration -ResourceGroupName psResourceGroup -Name "psConnectivityConfig" -NetworkManagerName psNetworkManager -ConnectivityTopology "HubAndSpoke" -Hub $hublist -AppliesToGroup $connectivityGroup -DeleteExistingPeering

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}
AppliesToGroupsText   : [
                          {
                            "NetworkGroupId": "/subscriptions/f0dc2b34-dfad-40e4-83e0-2309fed8d00b/resourceGroups/psResourceGroup/providers/Microsoft.Network/networkManagers/psNetworkManager/networkGroups/psNetworkGroup",
                            "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-07T04:37:43.1186543Z"
                        }
Name                  : psConnectivityConfig
Etag                  :
Id                    : /subscriptions/f0dc2b34-dfad-40e4-83e0-2309fed8d00b/resourceGroups/psResourceGroup/providers/Microsoft.Network/networkManagers/psNetworkManager/connectivityConfigurations/psConnectivityConfig

Creates a hub and spoke network manager connectivity configuration.

Example 2

$connectivityGroupItem = New-AzNetworkManagerConnectivityGroupItem -NetworkGroupId "/subscriptions/f0dc2b34-dfad-40e4-83e0-2309fed8d00b/resourceGroups/psResourceGroup/providers/Microsoft.Network/networkManagers/psNetworkManager/networkGroups/psNetworkGroup"
[System.Collections.Generic.List[Microsoft.Azure.Commands.Network.Models.NetworkManager.PSNetworkManagerConnectivityGroupItem]]$connectivityGroup  = @()  
$connectivityGroup.Add($connectivityGroupItem)   
New-AzNetworkManagerConnectivityConfiguration -ResourceGroupName psResourceGroup -Name "psConnectivityConfigMesh" -NetworkManagerName psNetworkManager -ConnectivityTopology "Mesh" -AppliesToGroup $connectivityGroup -DeleteExistingPeering

ConnectivityTopology  : Mesh
Hubs                  : {}
DeleteExistingPeering : True
IsGlobal              : False
AppliesToGroups       : {/subscriptions/f0dc2b34-dfad-40e4-83e0-2309fed8d00b/resourceGroups/psResourceGroup/providers/Microsoft.Network/networkManagers/psNetworkManager/networkGroups/psNetworkGroup}
AppliesToGroupsText   : [
                          {
                            "NetworkGroupId": "/subscriptions/f0dc2b34-dfad-40e4-83e0-2309fed8d00b/resourceGroups/psResourceGroup/providers/Microsoft.Network/networkManagers/psNetworkManager/networkGroups/psNetworkGroup",
                            "UseHubGateway": "False",
                            "IsGlobal": "False",
                            "GroupConnectivity": "None"
                          }
                        ]
HubsText              : []
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:43:00.9075845Z",
                          "LastModifiedBy": "jaredgorthy@microsoft.com",
                          "LastModifiedByType": "User",
                          "LastModifiedAt": "2022-08-07T04:43:00.9075845Z"
                        }
Name                  : psConnectivityConfigMesh
Etag                  :
Id                    : /subscriptions/f0dc2b34-dfad-40e4-83e0-2309fed8d00b/resourceGroups/psResourceGroup/providers/Microsoft.Network/networkManagers/psNetworkManager/connectivityConfigurations/psConnectivityConfigMesh

Creates a mesh network manager connectivity configuration.

Parameters

-AppliesToGroup

Connectivity Group.

Type:PSNetworkManagerConnectivityGroupItem[]
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-AsJob

Run cmdlet in the background

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ConnectivityTopology

Connectivity Topology.

Type:String
Accepted values:HubAndSpoke, Mesh
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-DefaultProfile

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

Type:IAzureContextContainer
Aliases:AzContext, AzureRmContext, AzureCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DeleteExistingPeering

DeleteExistingPeering Flag.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-Description

Description.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-Force

Do not ask for confirmation if you want to overwrite a resource

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Hub

Hub Id list.

Type:PSNetworkManagerHub[]
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-IsGlobal

IsGlobal Flag.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-Name

The resource name.

Type:String
Aliases:ResourceName
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-NetworkManagerName

The network manager name.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:True

-ResourceGroupName

The resource group name.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

String

List<T>[[Microsoft.Azure.Commands.Network.Models.NetworkManager.PSNetworkManagerConnectivityGroupItem, Microsoft.Azure.PowerShell.Cmdlets.Network, Version=4.16.1.0, Culture=neutral, PublicKeyToken=null]]

List<T>[[Microsoft.Azure.Commands.Network.Models.NetworkManager.PSNetworkManagerHub, Microsoft.Azure.PowerShell.Cmdlets.Network, Version=4.16.1.0, Culture=neutral, PublicKeyToken=null]]

SwitchParameter

Outputs

PSNetworkManagerConnectivityConfiguration