共用方式為


New-AzVpnServerConfigurationPolicyGroup

建立可連結至 P2SVpnGateway 的新 VpnServerConfigurationPolicyGroup。

語法

New-AzVpnServerConfigurationPolicyGroup
   -ResourceGroupName <String>
   -ServerConfigurationName <String>
   -Name <String>
   -Priority <Int32>
   [-DefaultPolicyGroup]
   [-PolicyMember <PSVpnServerConfigurationPolicyGroupMember[]>]
   [-AsJob]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
New-AzVpnServerConfigurationPolicyGroup
   -ServerConfigurationObject <PSVpnServerConfiguration>
   -Priority <Int32>
   [-DefaultPolicyGroup]
   [-PolicyMember <PSVpnServerConfigurationPolicyGroupMember[]>]
   [-AsJob]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
New-AzVpnServerConfigurationPolicyGroup
   -ServerConfigurationResourceId <String>
   -Priority <Int32>
   [-DefaultPolicyGroup]
   [-PolicyMember <PSVpnServerConfigurationPolicyGroupMember[]>]
   [-AsJob]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

New-AzVpnServerConfigurationPolicyGroup Cmdlet 可讓您在 VpnServerConfiguration 下建立新的 VpnServerConfigurationPolicyGroup,此群組可連結至 P2SVpnGateway,以取得從點對站用戶端到 Azure VirtualWan 的點對站聯機。

範例

範例 1

# Create a PolicyMember1 Object
$policyGroupMember1 = New-Object -TypeName Microsoft.Azure.Commands.Network.Models.PSVpnServerConfigurationPolicyGroupMember
$policyGroupMember1.Name = "policyGroupMember1"
$policyGroupMember1.AttributeType = "AADGroupId"
$policyGroupMember1.AttributeValue = "41b23e61-6c1e-4545-b367-cd054e0ed4b5"

# Create a PolicyGroup1
New-AzVpnServerConfigurationPolicyGroup -ResourceGroupName TestRG -ServerConfigurationName VpnServerConfig2 -Name Group3 -Priority 3 -PolicyMember $policyGroupMember1

ProvisioningState               : Succeeded
IsDefault                       : True
Priority                        : 0
PolicyMembers                   : {AADPolicy, CertPolicy1, RadiusPolicy1}
P2SConnectionConfigurations     : {/subscriptions/b1f1deed-af60-4bab-9223-65d340462e24/resourceGroups/TestingRG/providers/Microsoft.Network/p2sVpnGateways/4e72273faa1346ad9b910c37a5667c99-westcentralus-gw/p2sConnectio
                                  nConfigurations/P2SConfig1, /subscriptions/b1f1deed-af60-4bab-9223-65d340462e24/resourceGroups/TestingRG/providers/Microsoft.Network/p2sVpnGateways/f6d6b5d6711641028c480bf342478392-we
                                  stcentralus-p2s-gw/p2sConnectionConfigurations/Config1}
PolicyMembersText               : [
                                    {
                                      "Name": "AADPolicy",
                                      "AttributeType": "AADGroupId",
                                      "AttributeValue": "41b23e61-6c1e-4545-b367-cd054e0ed4b4"
                                    },
                                    {
                                      "Name": "CertPolicy1",
                                      "AttributeType": "CertificateGroupId",
                                      "AttributeValue": "ab"
                                    },
                                    {
                                      "Name": "RadiusPolicy1",
                                      "AttributeType": "RadiusAzureGroupId",
                                      "AttributeValue": "6ad1bd09"
                                    }
                                  ]
P2SConnectionConfigurationsText : [
                                    {
                                      "Id": "/subscriptions/b1f1deed-af60-4bab-9223-65d340462e24/resourceGroups/TestingRG/providers/Microsoft.Network/p2sVpnGateways/4e72273faa1346ad9b910c37a5667c99-westcentralus-gw/p2
                                  sConnectionConfigurations/P2SConfig1"
                                    },
                                    {
                                      "Id": "/subscriptions/b1f1deed-af60-4bab-9223-65d340462e24/resourceGroups/TestingRG/providers/Microsoft.Network/p2sVpnGateways/f6d6b5d6711641028c480bf342478392-westcentralus-p2s-g
                                  w/p2sConnectionConfigurations/Config1"
                                    }
                                  ]
Name                            : Group1
Id                              : /subscriptions/b1f1deed-af60-4bab-9223-65d340462e24/resourceGroups/TestingRG/providers/Microsoft.Network/vpnServerConfigurations/MPConfig/configurationPolicyGroups/Group1

建立新的 VpnServerConfiguration PolicyGroup。

參數

-AsJob

在背景執行 Cmdlet

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

-Confirm

在執行 Cmdlet 之前,提示您進行確認。

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

-DefaultPolicyGroup

將此旗標設為此 VpnServerConfiguration 上的預設原則群組。

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

-DefaultProfile

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

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

-Name

資源名稱。

類型:String
別名:ResourceName, VpnServerConfigurationPolicyGroupName
Position:Named
預設值:None
必要:True
接受管線輸入:False
接受萬用字元:False

-PolicyMember

原則成員清單。

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

-Priority

原則群組的優先順序。 優先順序應依連續順序排列。

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

-ResourceGroupName

資源組名。

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

-ServerConfigurationName

此 PolicyGroup 所連結的 VpnServerConfiguration 名稱。

類型:String
別名:ParentVpnServerConfigurationName, VpnServerConfigurationName
Position:Named
預設值:None
必要:True
接受管線輸入:True
接受萬用字元:False

-ServerConfigurationObject

此 PolicyGroup 所連結的 VpnServerConfiguration 物件。

類型:PSVpnServerConfiguration
別名:ParentVpnServerConfiguration, VpnServerConfiguration
Position:Named
預設值:None
必要:True
接受管線輸入:True
接受萬用字元:False

-ServerConfigurationResourceId

此 PolicyGroup 所連結之 VpnServerConfiguration 對象的標識碼。

類型:String
別名:ParentVpnServerConfigurationId, VpnServerConfigurationId
Position:Named
預設值:None
必要:True
接受管線輸入:True
接受萬用字元:False

-WhatIf

顯示 Cmdlet 執行時會發生什麼事。 指令未執行。

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

輸入

輸出