Get-PswaAuthorizationRule
Get-PswaAuthorizationRule
Gets a set of Web Access authorization rules.
Syntax
Parameter Set: ID
Get-PswaAuthorizationRule [[-Id] <Int32[]> ] [ <CommonParameters>]
Parameter Set: Name
Get-PswaAuthorizationRule [-RuleName] <String[]> [ <CommonParameters>]
Detailed Description
The Get-PswaAuthorizationRule cmdlet returns a set of the Windows PowerShell® Web Access authorization rules.
If neither the ID parameter nor the RuleName parameter is specified, then this cmdlet lists all rules. The ID parameter can be used to filter the results.
Parameters
-Id<Int32[]>
Specifies the IDs of the rules to get. If no IDs are specified, then this cmdlet returns all authorization rules.
Aliases |
none |
Required? |
false |
Position? |
2 |
Default Value |
none |
Accept Pipeline Input? |
True (ByValue, ByPropertyName) |
Accept Wildcard Characters? |
false |
-RuleName<String[]>
Specifies the names of authorization rules to retrieve. This parameter returns any rules that match the rule names of the strings in this array exactly.
Aliases |
none |
Required? |
true |
Position? |
2 |
Default Value |
none |
Accept Pipeline Input? |
True (ByValue, ByPropertyName) |
Accept Wildcard Characters? |
false |
<CommonParameters>
This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).
Inputs
The input type is the type of the objects that you can pipe to the cmdlet.
int[], String[]
This cmdlet accepts an array of integers or an array of string values as input.
Outputs
The output type is the type of the objects that the cmdlet emits.
Microsoft.Management.PowerShellWebAccess.PswaAuthorizationRule[]
This cmdlet produces a PswaAuthorizationRule object as output.
Examples
EXAMPLE 1: Get all rules
This command gets all of the rules.
PS C:\> Get-PswaAuthorizationRule
EXAMPLE 2: Get a rule by ID
This command gets a rule with an ID of 20.
PS C:\> Get-PswaAuthorizationRule –Id 20
EXAMPLE 3: Get a rule by ID and name from values passed by using the pipeline
This command gets a rule based on values passed in by using the pipeline. A rule ID and a rule name are passed in this cmdlet.
PS C:\> "rule10",0 | Get-PswaAuthorizationRule