Create a virtual gatway access rule.
New-DSVirtualGatewayAccessRule [-Access] <GatewayAccessRule> [-Type] <NetworkAccessRuleType>
[-Value] <string> [<CommonParameters>]
Creates a virtual gateway access rule. Depending on the specified type, a corresponding regular expression is applied to validate the input value.
PS C:\> $rules = @(
New-DSVirtualGatewayAccessRule -Access Deny -Type IP -Value '1.2.3.4'
New-DSVirtualGatewayAccessRule -Access Deny -Type DNS 'a.com'
)
PS C:\> $gatewayId = Get-DSGateway -Name 'GatewayA' | Select-Object -ExpandProperty ID
PS C:\> New-DSVirtualGateway -LinkedGatewayID $gatewayId -Name 'My virtual gateway' -Description 'A little description' -Rule $rules
Create a virtual gateway that denies access from a specific IP address and the domain 'a.com'.
PS C:\> $gatewayId = Get-DSGateway -Name 'VirtualGatewayA' | Select-Object -ExpandProperty ID
PS C:\> $newRule = New-DSVirtualGatewayAccessRule -Access Deny -Type IP -Value '1.2.3.4'
PS C:\> Update-DSVirtualGateway -GatewayID $gatewayId -Rule $newRule
Replace all existing access rules of the virtual gateway for one that denies the IP address '1.2.3.4'.
The effect of the rule.
Type: Devolutions.PowerShell.Enums.GatewayAccessRule
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: 0
IsRequired: true
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
The type of the rule.
Type: Devolutions.RemoteDesktopManager.NetworkAccessRuleType
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: 1
IsRequired: true
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
The value of the rule based on the type.
Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: 2
IsRequired: true
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
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.
For more information, type "Get-Help New-DSVirtualGatewayAccessRule -detailed". For technical information, type "Get-Help New-DSVirtualGatewayAccessRule -full".