I made some custom PSScriptAnalyzer rules I thought I would share as it might be helpful to some other people out there. The rules help you identify which commands in a module/script can run on certain PowerShell/Windows versions. I have found times where I write a script on my Windows 10 machine then find it doesn’t work on another machine as it has an older version of PowerShell or the operating system doesn’t support the cmdlet/function. I use these rules to determine the minimum supported versions of modules/scripts that I write.
GitHub: https://github.com/GavinEke/VersionAnalyzerRules
PSGallery: https://www.powershellgallery.com/packages/VersionAnalyzerRules
-Gavin
submitted by /u/GavinEke
[link] [comments]
The post VersionAnalyzerRules for PSScriptAnalyzer appeared first on How to Code .NET.