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.