What Rules My Class?

There have been a few questions regarding how to enumerate the rules targeting a class. Here is a script you can save as a file. I named the script get-rulesforclass.ps1 param ([String] $className) $class = get-monitoringclass | where {$_.Name -eq $className} if ($class -eq $null){ throw “Class ‘$className’ not found.”;} if ($class -is [Array]){ throw “More than…

0