I suspect William has already tackled your issue.
Don't mind the PowerCLI 5.5 reference in the post, this will also work for later PowerCLI versions.
---------------------------------------------------------------------------------------------------------
Was it helpful? Let us know by completing this short survey here.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference