編輯

共用方式為


New-AzNetworkManagerConnectivityGroupItem

Creates a connectivity group item.

Syntax

New-AzNetworkManagerConnectivityGroupItem
   -NetworkGroupId <String>
   [-UseHubGateway]
   [-GroupConnectivity <String>]
   [-IsGlobal]
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]

Description

The New-AzNetworkManagerConnectivityGroupItem cmdlet creates a connectivity group item.

Examples

Example 1

$networkGroupId = "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/TestRG/providers/Microsoft.Network/networkManagers/TestNMName/networkGroups/TestGroup"
New-AzNetworkManagerConnectivityGroupItem -NetworkGroupId $networkGroupId -UseHubGateway -GroupConnectivity "None" -IsGlobal

NetworkGroupId                                                                                                                                           UseHubGateway IsGlobal GroupConnectivity
--------------                                                                                                                                           ------------- -------- -----------------
/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/TestRG/providers/Microsoft.Network/networkManagers/TestNMName/networkGroups/TestGroup True          True     None

Creates a connectivity group item using hub as gateway.

Example 2

$networkGroupId = "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/TestRG/providers/Microsoft.Network/networkManagers/TestNMName/networkGroups/TestGroup"
New-AzNetworkManagerConnectivityGroupItem -NetworkGroupId $networkGroupId -GroupConnectivity "DirectlyConnected"

NetworkGroupId                                                                                                                                           UseHubGateway IsGlobal GroupConnectivity
--------------                                                                                                                                           ------------- -------- -----------------
/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/TestRG/providers/Microsoft.Network/networkManagers/TestNMName/networkGroups/TestGroup False         False    DirectlyConnected

Creates a connectivity group item with direct connectivity.

Parameters

-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

-GroupConnectivity

Group Connectivity.

Type:String
Accepted values:None, DirectlyConnected
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

-NetworkGroupId

Network Group Id

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

-UseHubGateway

Use hub gateway flag

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

Inputs

String

SwitchParameter

Outputs

PSNetworkManagerConnectivityGroupItem