Running Remote Jobs (Quest vRanger)

This topic contains 3 replies, has 2 voices, and was last updated by  Biokinton 3 years, 11 months ago.

  • Author
    Posts
  • #12604

    Biokinton
    Participant

    Hello everyone,

    Quest's vRanger product has a PowerShell interface and I've been running a command to pull back a list of VM backups created between two dates. This command can take upwards of 20 minutes to finish so in order not to tie up my working session I've been trying to run the task as a remote job. It all seems to work fine but when I retrieve the job there's no output. I establish a session to the server and run the code as follows:

    $vRangerSession = New-PSSession -Name vRanger -ComputerName  -ConfigurationName Microsoft.PowerShell32
    Invoke-Command { Add-PSSnapin vRanger.API.PowerShell; Get-RepositorySavePoint -Id  -StartTime "01/06/2013" -EndTime "30/06/2013" } -Session $vRangerSession -AsJob

    There are two commands in the scriptblock, one to add the relevant snap-in and then the actual command itself. It takes the right amount of time to finish but when I receive the job there's no output. Nothing. Of course if I jump into the session and run the command the pipeline is filled with all the matching backups (some 294 of them).

    Is this a quirk of the Quest extension, my mistake or a combination of both?

    All advice very gratefully received. 🙂

  • #12605

    Richard Siddaway
    Moderator

    If you run the invoke-command without the -AsJob do you get data returned.

    You are connecting to the Microsoft.PowerShell32 endpoint – are your client and server both 32bit?

  • #12606

    Biokinton
    Participant

    Hi Richard,

    Thanks for the swift response. The extension is 32-bit, hence why I was connecting to the 32-bit endpoint. That stumped me for a while initially. 🙂

    I just tried again, this time using the 32-bit console on my computer, and the result is the same. There's also no output if I drop the -AsJob parameter. The console sits there for the requisite amount of time then drops me back at the prompt.

    It's a weird one!

  • #12608

    Biokinton
    Participant

    Okay, stand down. Classic case of me being an idiot. I've been chunking through these backups in month-sized pieces and got completely lost as to where I was in the process. The reason the command wasn't outputting any data is because there _is_ nothing to output for that particular month.

    :: slaps self in face ::

    I'll try harder next time. =)

You must be logged in to reply to this topic.