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. ![]()