{"id":2505,"date":"2013-11-28T11:59:00","date_gmt":"2013-11-28T11:59:00","guid":{"rendered":"https:\/\/blogs.technet.microsoft.com\/heyscriptingguy\/2013\/11\/28\/powertip-remove-powershell-web-access-authorization-rules\/"},"modified":"2013-11-28T11:59:00","modified_gmt":"2013-11-28T11:59:00","slug":"powertip-remove-powershell-web-access-authorization-rules","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/scripting\/powertip-remove-powershell-web-access-authorization-rules\/","title":{"rendered":"PowerTip: Remove PowerShell Web Access Authorization Rules"},"content":{"rendered":"<p><strong>Summary<\/strong>: Learn how to remove Windows PowerShell Web Access authorization rules.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/q-for-powertip.jpg\" alt=\"Hey, Scripting Guy! Question\">&nbsp;How can I remove Windows PowerShell Web Access authorization rules that are no longer required?<\/p>\n<p style=\"padding-left: 30px\"><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/a-for-powertip.jpg\" alt=\"Hey, Scripting Guy! Answer\">&nbsp;If you can identify the rule, use&nbsp;<strong>Remove-PswaAuthorizationRule<\/strong>&nbsp;from the&nbsp;<strong>PowerShellWebAccess<\/strong>&nbsp;module:<\/p>\n<p style=\"padding-left: 120px\">Remove-PswaAuthorizationRule -Id 1<\/p>\n<p style=\"padding-left: 120px\">~or~<\/p>\n<p style=\"padding-left: 120px\">Get-PswaAuthorizationRule -RuleName &#8216;server02 AD admin only&#8217; | Remove-PswaAuthorizationRule<\/p>\n<p style=\"padding-left: 90px\">To remove all rules for a particular server:<\/p>\n<p style=\"padding-left: 120px\">Get-PswaAuthorizationRule | where Destination -eq &#8216;manticoreserver02&#8217; | <br \/>Remove-PswaAuthorizationRule<\/p>\n<p style=\"padding-left: 90px\">To remove rules based on the configuration name:<\/p>\n<p style=\"padding-left: 120px\">Get-PswaAuthorizationRule | where ConfigurationName -eq &#8216;ADPS&#8217; | Remove-PswaAuthorizationRule<\/p>\n<p style=\"padding-left: 60px\"><strong>Recommendation<\/strong>&nbsp; &nbsp;Use&nbsp;<strong>Get-PswaAuthorizationRule<\/strong>, filter the rule (or rules) you want to remove, <br \/>then pipe the results to&nbsp;<strong>Remove-PswaAuthorizationRule<\/strong>.&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Summary: Learn how to remove Windows PowerShell Web Access authorization rules. &nbsp;How can I remove Windows PowerShell Web Access authorization rules that are no longer required? &nbsp;If you can identify the rule, use&nbsp;Remove-PswaAuthorizationRule&nbsp;from the&nbsp;PowerShellWebAccess&nbsp;module: Remove-PswaAuthorizationRule -Id 1 ~or~ Get-PswaAuthorizationRule -RuleName &#8216;server02 AD admin only&#8217; | Remove-PswaAuthorizationRule To remove all rules for a particular server: Get-PswaAuthorizationRule [&hellip;]<\/p>\n","protected":false},"author":596,"featured_media":87096,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[356,57,189,4,45],"class_list":["post-2505","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-scripting","tag-powertip","tag-remoting","tag-richard-siddaway","tag-scripting-techniques","tag-windows-powershell"],"acf":[],"blog_post_summary":"<p>Summary: Learn how to remove Windows PowerShell Web Access authorization rules. &nbsp;How can I remove Windows PowerShell Web Access authorization rules that are no longer required? &nbsp;If you can identify the rule, use&nbsp;Remove-PswaAuthorizationRule&nbsp;from the&nbsp;PowerShellWebAccess&nbsp;module: Remove-PswaAuthorizationRule -Id 1 ~or~ Get-PswaAuthorizationRule -RuleName &#8216;server02 AD admin only&#8217; | Remove-PswaAuthorizationRule To remove all rules for a particular server: Get-PswaAuthorizationRule [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/posts\/2505","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/users\/596"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/comments?post=2505"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/posts\/2505\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/media\/87096"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/media?parent=2505"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/categories?post=2505"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/tags?post=2505"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}