I am attempting to see if I can retrieve all the bits jobs running on a remote machine. I have tried this code and it works great if using the local machine but nothing is returned for a remote machine. Any suggestions how to retrieve this information?
$jobwork = {
#get-all bits downloads
$jobout = Get-BitsTransfer -AllUsers | ? { $_.jobstate -ne 'transferred'}
$jobout
}
$jobresults = Start-Job -ScriptBlock $jobwork -Name $job_name -ArgumentList $Compname