O'Reilly logo

Mastering Windows PowerShell Scripting by Brenton J.W. Blawat

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Methodologies for testing code

When you are creating PowerShell Scripts, it is imperative that you test your code along the way. While there are many different development standards which you can follow such as Scrum and Agile, they all have the same premise of "test often". This section will explore recommendations for testing your code as you are developing it so that you can provide more reliable scripts.

Testing the –WhatIf argument

PowerShell offers the ability to test the cmdlet's code without actually running them. This is done by the use of the –WhatIf argument. The –WhatIf argument will simulate the action that the cmdlet will take on a system without actually executing the command itself. This can assist you in determining if you have ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required