PowerShell development standards including VMware and Pester. Use when writing PowerShell.
[CmdletBinding()]; output [PSCustomObject]$() for expansion (not ${}), especially with properties or after colons$var: is a drive qualifier — "$source: text" parses as variable $source:, use "$($source): text"$event, $input, $args, $this, $_ outside pipeline)ReconfigVM_Task returns ManagedObjectReference, not Task objectGet-Task -Id "$taskMoRef" | Wait-Task (vSphere 7+)-Server $vc when multiple vCenters connected-not instead of ! when running PowerShell via bash (bash escapes ! to \!)$results = foreach ($item in $collection) { ... } (avoid +=)Write-Verbose for debug/progress messages (not Write-Host).SYNOPSIS required, 1+ .EXAMPLE, omit .NOTESDescribe/Context/It, BeforeAll, Should -Be/-Match/-Not[System.IO.File]::WriteAllText() and ReadAllText() for deterministic test data (avoids cmdlet overhead)BeforeAll — single place to maintainInvoke-TestEnvironment) to handle setup/teardown/environment swapInvoke-Pester ./tests.ps1 -Output Detailed$ expansion: printf '%s' '$var' → literal $var' → '\''cmd /c mangles nested quotes — use PowerShell as shell insteadcd: use cd C:/code/path not cd /d C:\code\path — /d is cmd.exe syntax&& fails in PowerShell — use ; or separate commands when hooks intercept bash