$ 0 0 That seems to indicate the PowerCLI pssnapin is not loaded.Did you do aAdd-PSSnapin VMware.VimAutomation.Core