when i issue the command:
get-wmiobject win32_bios -computername remotecomputername -AsJob
i got the following error on Receive-Job:
Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)) + CategoryInfo : InvalidResult: (:) [], UnauthorizedAccessException + FullyQualifiedErrorId : JobStateFailed
i was stuck with ‘RPC server unavailable’ error and that was a firewall lack of premissions but now i really dont know why
i got the access denied matter: the user credential are the same (Administrator) and the command without -AsJob parameter works.
What have I done untill now:
- double check firewall permissions on both client and servers and tried with firewalls disabled (so it’s not a firewall problem)
- double check for services active and running; since the cmdlets work without -AsJob parameter, the services are not the issues but
you never know - double check for user Administrator permissions on wmimgmt.msc, Administrator has all permissions granted on both PCs
- double check for user Administrator permissions on dcomcnfg, Administrator has all permissions granted on both PCs
- tried command on both directions Computer A -> Computer B and Computer B -> Computer A: they have the same behavior,
the cmdlet works without -AsJob parameter as I said, but produces the same error when executed as a job
I already verified that if the same command is used inside an Invoke-Command -AsJob all works fine
The other commands with the -AsJob parameter work just fine (for example Restart-Computer of Invoke-Command)
Any suggestion on what to check to make this command function as a powershell job?
Thanks in advance