S
S
SierraMadre2017-12-24 10:27:23
PowerShell
SierraMadre, 2017-12-24 10:27:23

Why doesn't it let you?

Good afternoon.
There are 2 computers in the local network. I want to display information about the OS using:
get-wmiobject win32_operatingsystem -computername "compname".
In response, I hear:
get-wmiobject : Access denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
Also used:
get-wmiobject win32_operatingsystem -computername "compname" -Credential "username"
Response:
get-wmiobject : The RPC server is unavailable. (Exception from HRESULT: 0x800706BA)
Any ideas, Google didn't help.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
E
Eugene, 2017-12-24
@yellowmew

The root cause on a normally working computer without settings already made by crooked hands is a firewall, as azarij
already suggested. It didn’t help - go ahead:
1. the computer name is not allowed - try to enter in the format of an IP address or a fully qualified domain name like computername.domain.name instead of computername
2 The username does not match - try to enter it in the format remotecomputername\username
3. Remote access services to RPC are disabled - we solve this problem. (here is an article on which services to check https://social.technet.microsoft.com/Forums/window...

A
azarij, 2017-12-24
@azarij

disable the firewall on both machines.

D
dmfun, 2017-12-25
@dmfun

Also, access denied is often due to remote UAC
You need to create a DWORD value
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\system\LocalAccountTokenFilterPolicy
1

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question