New-AzVpnServerConfigurationPolicyGroup
Creates a new VpnServerConfigurationPolicyGroup that can be attached to P2SVpnGateway.
Syntax
ByVpnServerConfigurationName (Default)
New-AzVpnServerConfigurationPolicyGroup
-ResourceGroupName <String>
-ServerConfigurationName <String>
-Name <String>
-Priority <Int32>
[-DefaultPolicyGroup]
[-PolicyMember <PSVpnServerConfigurationPolicyGroupMember[]>]
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
ByVpnServerConfigurationObject
New-AzVpnServerConfigurationPolicyGroup
-ServerConfigurationObject <PSVpnServerConfiguration>
-Priority <Int32>
[-DefaultPolicyGroup]
[-PolicyMember <PSVpnServerConfigurationPolicyGroupMember[]>]
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
ByVpnServerConfigurationResourceId
New-AzVpnServerConfigurationPolicyGroup
-ServerConfigurationResourceId <String>
-Priority <Int32>
[-DefaultPolicyGroup]
[-PolicyMember <PSVpnServerConfigurationPolicyGroupMember[]>]
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
The New-AzVpnServerConfigurationPolicyGroup cmdlet enables you to create a new VpnServerConfigurationPolicyGroup under VpnServerConfiguration which can be attached to P2SVpnGateway for Point to site connectivity from Point to site clients to Azure VirtualWan.
Examples
Example 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
Creates a new VpnServerConfiguration PolicyGroup.
Parameters
-AsJob
Run cmdlet in the background
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-Confirm
Prompts you for confirmation before running the cmdlet.
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Aliases: cf
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-DefaultPolicyGroup
Flag to set this as Default Policy Group on this VpnServerConfiguration.
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.
Parameter properties
Type: IAzureContextContainer
Default value: None
Supports wildcards: False
DontShow: False
Aliases: AzContext, AzureRmContext, AzureCredential
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-Name
The resource name.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Aliases: ResourceName, VpnServerConfigurationPolicyGroupName
Parameter sets
ByVpnServerConfigurationName
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-PolicyMember
The list of Policy members.
Parameter properties
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
-Priority
The Priority of the policy group.
Priority should be in consecutive orders.
Parameter properties
Type: Int32
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
-ResourceGroupName
The resource group name.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
ByVpnServerConfigurationName
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-ServerConfigurationName
The VpnServerConfiguration name this PolicyGroup is linked to.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Aliases: ParentVpnServerConfigurationName, VpnServerConfigurationName
Parameter sets
ByVpnServerConfigurationName
Position: Named
Mandatory: True
Value from pipeline: True
Value from pipeline by property name: False
Value from remaining arguments: False
-ServerConfigurationObject
The VpnServerConfiguration object this PolicyGroup is linked to.
Parameter properties
Type: PSVpnServerConfiguration
Default value: None
Supports wildcards: False
DontShow: False
Aliases: ParentVpnServerConfiguration, VpnServerConfiguration
Parameter sets
ByVpnServerConfigurationObject
Position: Named
Mandatory: True
Value from pipeline: True
Value from pipeline by property name: False
Value from remaining arguments: False
-ServerConfigurationResourceId
The id of VpnServerConfiguration object this PolicyGroup is linked to.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Aliases: ParentVpnServerConfigurationId, VpnServerConfigurationId
Parameter sets
ByVpnServerConfigurationResourceId
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
-WhatIf
Shows what would happen if the cmdlet runs.
The cmdlet is not run.
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Aliases: wi
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable,
-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see
about_CommonParameters .
Outputs