PowerCLI job does not work

This topic contains 1 reply, has 2 voices, and was last updated by Profile photo of Don Jones Don Jones 1 year, 3 months ago.

  • Author
  • #27666
    Profile photo of Bojan Zivkovic
    Bojan Zivkovic

    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.

  • #27680
    Profile photo of Don Jones
    Don Jones

    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.

You must be logged in to reply to this topic.