Closed Gobiman closed 6 years ago
Can you provide more info:
-OS -PSVersion -example of code to reproduce the error -command line use and parameters
Hi OS= Win2016 (works locally but not remotely), running as admin on both systems PSVersion= 5.1.14393.2363 Invoke-CommandAs -ComputerName 'ServerName' -ScriptBlock { Get-Process } The output PS C:\local> $Error Get-Job : The command cannot find the job because the job name 47621e7f-6d1f-4265-b011-05eb16fe8705 was not found. Verify the value of the Name parameter, and then try the command again. At C:\Program Files\WindowsPowerShell\Modules\Invoke-CommandAs\2.0\Invoke-CommandAs.psm1:208 char:36
+ CategoryInfo : ObjectNotFound: (47621e7f-6d1f-4265-b011-05eb16fe8705:String) [Get-Job], PSArgumentExcep
tion
+ FullyQualifiedErrorId : JobWithSpecifiedNameNotFound,Microsoft.PowerShell.Commands.GetJobCommand
Get-Job : The command cannot find the job because the job name 47621e7f-6d1f-4265-b011-05eb16fe8705 was not found. Verify the value of the Name parameter, and then try the command again. At C:\Program Files\WindowsPowerShell\Modules\Invoke-CommandAs\2.0\Invoke-CommandAs.psm1:208 char:36
+ CategoryInfo : ObjectNotFound: (47621e7f-6d1f-4265-b011-05eb16fe8705:String) [Get-Job], PSArgumentExcep
tion
+ FullyQualifiedErrorId : JobWithSpecifiedNameNotFound,Microsoft.PowerShell.Commands.GetJobCommand
Thanks
Please provide a -Credential
Did this resolve your issue?
Also, try establishing a New-PSSession, and use that instead of ComputerName/Credential. Just to help debug.
Will close this issue until further notice.
I fixed some issues in latest release (3.0), maybe worth retesting!
Nothing happens when I run the command, see below the $error Powershell version is 5.1
Get-Job : The command cannot find the job because the job name bc725259-2000-4917-8639-276a36418032 was not found. Verify the value of the Name parameter, and then try the command again. At C:\Program Files\WindowsPowerShell\Modules\Invoke-CommandAs\2.0\Invoke-CommandAs.psm1:208 char:36