Tuesday, January 17, 2012

Powershell ScriptCop

I am a fan of Perl Critic the perl tool which gies feedback on your Perl scripts to see if they follow standard conventions, when I read about ScriptCop for PowerShell I downloaded it and tested it out. Seems like a great start to have Perl Critic functions for PowerShell.

Downloaded and copied the files here:


Folder Tree
Folder PATH listing
Volume serial number is 803E-1130

I was then able to use Import-Module ScriptCop.
Finally I used Test-Command Scriptname.ps1 and got some feedback on my code.

I was hoping that I would be able to run a fix and get the indenting corrected, however I didn’t find that function in the existing download.

The Scripting Guy had wrote about ScriptCop, also to note I leared about ScriptCop while looking at Powershell notes on Stack OverFlow.