PowerTip: Remove PowerShell Web Access Authorization Rules

Summary: Learn how to remove Windows PowerShell Web Access authorization rules.

Hey, Scripting Guy! Question How can I remove Windows PowerShell Web Access authorization rules that are no longer required?

Hey, Scripting Guy! Answer If you can identify the rule, use Remove-PswaAuthorizationRule from the PowerShellWebAccess module:

Remove-PswaAuthorizationRule -Id 1


Get-PswaAuthorizationRule -RuleName ‘server02 AD admin only’ | Remove-PswaAuthorizationRule

To remove all rules for a particular server:

Get-PswaAuthorizationRule | where Destination -eq ‘manticoreserver02’ |

To remove rules based on the configuration name:

Get-PswaAuthorizationRule | where ConfigurationName -eq ‘ADPS’ | Remove-PswaAuthorizationRule

Recommendation   Use Get-PswaAuthorizationRule, filter the rule (or rules) you want to remove,
then pipe the results to Remove-PswaAuthorizationRule