From the course: PowerShell: Scripting for Advanced Automation
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Quality control using PSScriptAnalyzer
From the course: PowerShell: Scripting for Advanced Automation
Quality control using PSScriptAnalyzer
- [Instructor] The final tool that I want to discuss in this section, is not just about troubleshooting, although it definitely helps with that. PS script analyzer is a tool that can help you provide quality control for your PowerShell scripts. The quality control methods are there to help enforce best practices established by the DevOps community and by your own company. I'm not talking about best practices like how many extra line breaks you need, or whether or not you use Pascal case in every expression. No, I'm talking about whether or not you follow good security practices, like avoiding the Invoke-Expression commandlet with any type of variable. Or limiting expressions, like hard-coding a computer name right into the script. These and some other less attractive practices will weaken your scripts, challenge your organization's security, or cause the scripts to fail when run by a different user or on a different system. These kinds of things ought to be caught by some type of…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.