Running Remote Jobs (Quest vRanger)

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 <blah> -ConfigurationName Microsoft.PowerShell32
Invoke-Command { Add-PSSnapin vRanger.API.PowerShell; Get-RepositorySavePoint -Id <blah> -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. :slight_smile:

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?

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. :slight_smile:

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!

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. =)