Earlier this year i have found two errors within the Get-DistributedSwitchPortGroup cmdlet from the book “The VMware vSphere PowerCLI Reference: Automating vSphere Administration”. The book is a great resource for automating vSphere environments and the scripts extend PowerCLI with the missing dvSwitch cmdlets and other useful stuff.