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.

Debugging in PowerShell ISE

Debugging in PowerShell ISE

From the course: PowerShell: Scripting for Advanced Automation

Start my 1-month free trial

Debugging in PowerShell ISE

- [Narrator] The longer a PowerShell script is the harder it can be to troubleshoot. Now one of the design concepts of PowerShell can help with this. The fact that PowerShell reads and executes all scripts from the top down will allow you to rule out some potential problems. For example, this script will import some modules from my local repository and add a couple of .NET classes so that we can create a form that allows a user to enter new user information into a GUI form, and then once that information has all been collected it will go ahead and save it to a variable, which can then be used as the input parameter for a couple of functions to create a new user account and a new mailbox. Well if I run this script, right off I'm gonna get a warning that there are some unapproved verbs in my modules, but I knew that so I'm not overly concerned. Once the form is filled out, Scott Burel username, job title, employee, well I must be number one. When I try to create the account I get a lot…

Contents