When you write a PowerShell script, you might constantly think about whether you are following best practices or no. Do you know you have a tool that is very handy to use and can you in analyzing your PowerShell scripts? It is PSScriptAnalyze
First of all you need to install the module.
Install-Module -Name PSScriptAnalyzer
If your Powershell version is less than 5.1( First run below command);
Install-PackageProvider Nuget -MinimumVersion 18.104.22.168 –Force
And make sure you are running PowerShell in admin mode and you are running PowerShell in admin mode.
& That’s it.
Now your good friend PSScriptAnalyzer will help you in analyzing your scripts.
Invoke-ScriptAnalyzer -Path .\test.ps1
How cool is that :)
Go ahead and analyze your script and let e know how many p
For more information