Press "Enter" to skip to content

Parameter Validation Using Pester

Rob Sewell is using Pester to write Powershell unit tests and wants to test the existence of a parameter:

Here is the start of the function. I validate the VMName parameter to ensure that there a VM with that  name does not already exist

Before Rob’s posts, I hadn’t seen Pester before, but if you write a lot of Powershell code, it looks like a nice testing framework.