Remove-PswaAuthorizationRule
Remove-PswaAuthorizationRule
Removes an authorization rule.
Syntax
Parameter Set: ID
Remove-PswaAuthorizationRule [-Id] <Int32[]> [-Force] [-Confirm] [-WhatIf] [ <CommonParameters>]
Parameter Set: Rule
Remove-PswaAuthorizationRule [-Rule] <PswaAuthorizationRule[]> [-Force] [-Confirm] [-WhatIf] [ <CommonParameters>]
Detailed Description
The Remove-PswaAuthorizationRule cmdlet removes an authorization rule from Windows PowerShell Web Access.
Parameters
-Force
Forces the command to run without asking for user confirmation.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-Id<Int32[]>
Specifies the IDs of the rules to remove.
Aliases |
none |
Required? |
true |
Position? |
2 |
Default Value |
none |
Accept Pipeline Input? |
True (ByValue, ByPropertyName) |
Accept Wildcard Characters? |
false |
-Rule<PswaAuthorizationRule[]>
Specifies the rules to remove.
Aliases |
none |
Required? |
true |
Position? |
2 |
Default Value |
none |
Accept Pipeline Input? |
True (ByValue) |
Accept Wildcard Characters? |
false |
-Confirm
Prompts you for confirmation before running the cmdlet.
Required? |
false |
Position? |
named |
Default Value |
false |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Required? |
false |
Position? |
named |
Default Value |
false |
Accept Pipeline Input? |
false |
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[], PswaAuthorizationRule[]
This cmdlet accepts either an array of integers or an array of PswaAuthorizationRule objects.
Outputs
The output type is the type of the objects that the cmdlet emits.
- None
Examples
EXAMPLE 1: Remove an authorization rule by ID
This example removes the authorization rule with an ID of 2.
PS C:\> Remove-PswaAuthorizationRule –Id 2
EXAMPLE 2: Remove all rules
This example removes all authorization rules and requires confirmation by the user.
PS C:\> Get-PswaAuthorizationRule | Remove-PswaAuthorizationRule -Confirm