We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
#How to run Pester Tests
To use Pester to run tests against your environment to ensure the PowerCLI code is working, use the following steps:
Invoke-Pester -Script @{ Path = '.\*.ps1'; Parameters = @{ VCNAME="VC01.local"; VCUSER="Administrator@vsphere.local"; VCPASS="Admin!23"} }
The below is an example of how to run a test using PowerCLI Core:
docker run --rm -it \ -v ~/Dropbox/VMware/PowerCLI-Example-Scripts:/tmp/scripts vmware/powerclicore powershell 'Invoke-Pester -Script @{ Path = "/tmp/scripts/Pester/Test Connection to VC.ps1"; Parameters = @{ VCNAME="10.160.78.212"; VCUSER="Administrator@vsphere.local"; VCPASS="Admin!23"} }'