Quantcast
Channel: Hey, Scripting Guy! Blog
Viewing all articles
Browse latest Browse all 3333

PowerTip: Remove PowerShell Web Access Authorization Rules

$
0
0

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

~or~

Get-PswaAuthorizationRule -RuleName 'server02 AD admin only' | Remove-PswaAuthorizationRule

To remove all rules for a particular server:

Get-PswaAuthorizationRule | where Destination -eq 'manticore\server02' |
Remove-PswaAuthorizationRule

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


Viewing all articles
Browse latest Browse all 3333

Trending Articles