New-DSGatewayRuleset
Synopsis
Create a gateway ruleset.
Syntax
__AllParameterSets
New-DSGatewayRuleset [-LinkedGatewayID] <guid> [-Name] <string> [[-Description] <string>]
[[-Rule] <PSGatewayAccessRule[]>] [[-Security] <GatewaySecurity>] [-IsDefault]
[<CommonParameters>]Description
Create a gateway ruleset. It must be linked to an existing gateway. The rules to allow or deny access must be created with the cmdlet New-DSGatewayRulesetAccessRule.
This cmdlet was previously named New-DSVirtualGateway. That name is still available as an alias.
Examples
Example 1
PS C:\> $rules = @(
New-DSGatewayRulesetAccessRule -Access Deny -Type IP -Value '1.2.3.4'
New-DSGatewayRulesetAccessRule -Access Deny -Type DNS 'a.com'
)
PS C:\> $gatewayId = Get-DSGateway -Name 'GatewayA' | Select-Object -ExpandProperty ID
PS C:\> New-DSGatewayRuleset -LinkedGatewayID $gatewayId -Name 'My gateway ruleset' -Description 'A little description' -Rule $rulesCreate a gateway ruleset that denies access from a specific IP address and the domain 'a.com'.
Parameters
-Description
Description of the gateway ruleset.
-IsDefault
Set the gateway ruleset as the default gateway.
-LinkedGatewayID
Physical gateway's ID.
-Name
Name of the gateway ruleset.
-Rule
Rules of the gateway ruleset to allow or deny access.
-Security
Security configuration for the gateway ruleset. Use New-DSGatewaySecurity to create this object.
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.
Notes
For more information, type "Get-Help New-DSGatewayRuleset -detailed". For technical information, type "Get-Help New-DSGatewayRuleset -full".
Last updated
Was this helpful?