The RPC server is unavailable. (Exception from HRESULT: 0x800706BA)


hi,

i getting following error when run powershell command on remote computer configure firewall , winrm through gpo , notice command respond windows 7 service pack 1 , windows 8.1 pro 

error

cannot convert value "\\eyepaxws-03\root\default:stdregprov" type "system.management.managementclass". error: "the rpc server unavailable. (exception hresult: 0x800706ba)"
at d:\script\get-windowskey.ps1:10 char:9
+         $wmi = [wmiclass]"\\$target\root\default:stdregprov"
+         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + categoryinfo          : invalidargument: (:) [], runtimeexception
    + fullyqualifiederrorid : invalidcasttowmiclass
 
get-wmiobject : rpc server unavailable. (exception hresult: 0x800706ba)
at d:\script\get-windowskey.ps1:27 char:20
+         $win32os = get-wmiobject win32_operatingsystem -computer $target
+                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + categoryinfo          : invalidoperation: (:) [get-wmiobject], comexception
    + fullyqualifiederrorid : getwmicomexception,microsoft.powershell.commands.getwmiobjectcommand


thanks

what you're attempting makes no sense.

you've configured winrm on remote computer, , you're using dcom (which uses rpc) wmi class remote computer. you're not using winrm in least of ways in command you're executing.

the small amount of code posted not either, have absolutely no visibility of you're trying do.

if want continue using dcom instead of winrm, need allow dcom , rpc through client's firewall, different allowing winrm (they 2 different things).

for small amount of code posted, enabling rule 'windows management instrumentation (dcom-in)' should enough, depends on want rest of script.

if want use winrm, should either use new cim cmdlets (requires powershell v3 or higher) or use invoke-command.



Windows Server  >  Windows PowerShell



Comments

Popular posts from this blog

Edit Group Policy

Hyper-V VM not reaching OS 'Logon' screen

DNS question...