Author Posts

July 19, 2015 at 10:15 pm

Hi to everyone. I want to be short. Test job for retrieving info about virtual machine is in running state forever – gets stuck after connecting successfully to vcenter server.

$cred = Get-Credential -UserName domain\username -Message 'Enter password:'

Start-Job -ScriptBlock {
Import-Module 'C:\Program Files (x86)\VMware\Infrastructure\vSphere PowerCLI\Modules\VMware.VimAutomation.Core'
Connect-VIServer vcenter -Credential $c
Get-VM db01

} -RunAs32 -ArgumentList $cred

I am using PowerShell v4 on Win 8.1 Pro x64 OS.

July 20, 2015 at 6:08 am

You're probably going to get a better answer by posting in VMware's own PowerCLI forums. They're very responsive, and the people there work with PowerCLI every day.