Reputation: 171
First my workingsetup:
DesktopPC: Windows 10 Pro, Version: 10.0.10586 Build: 10586, 64-Bit
Laptop: Windows 10 Pro, Version: 10.0.10586 Build: 10586, 64-Bit
User: Both computers have the same username {zuka} & password {blah}.
I tried to connect remotely, with WMIC to my DesktopPC, with my Laptop and to execute a query.
I typed these following shell commands into Powershell:
PS C:\Windows\system32> wmic
wmic:root\cli> /user: zuka
Please enter the password:blah
wmic:root\cli> /node: {IP-Address of my DesktopPC}
wmic:root\cli> csproduct get /value
Node - {IP-Address of my DesktopPC}
Error:
Description = Access is denied.
Or with:
get-wmiobject CIM_Memory -computername desktopPC { or IP } -credential zuka
I get a errormessage like:
Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
I tried to resolve the problem with these following steps: ( But none of them worked :[ )
Is there a specific issue with Windows 10 or did I miss a certain configuration?
Upvotes: 1
Views: 26348
Reputation: 171
To enable remote access for other PC's on WMI, it is needed to add the hosts into the trustedhost-list in winrm, if the computers aren't in the same or any domain.
Enable winrm. On the computer, you want to access.
Check if winrm is running or stopped:
get-service winrm
If it is stopped, type:
enable-PSRemoting -force
Add access permission to the remote host.
winrm s winrm/config/client '@{TrustedHosts="REMOTECOMPUTERNAME/IP"}'
So in my case:
winrm s winrm/config/client '@{TrustedHosts="laptopPC"}'
To verify the winrm service, you can type:
winrm quickconfig
It will give the current status of the service and if needed, it will configure the WinRM service.
Unfortunately the windows firewall is blocking the remote access.
Now I can acces the WMI from my laptopPC to my desktopPC with this following commandline:
get-wmiobject CIM_Memory -computername desktopPC { or IP } -credential zuka
And then it asks for the password. And voilà! I got the information of the memory, trought remote access. =)
Upvotes: 13
Reputation: 2718
Unless you have a domain set up at home it looks like your passing an incorrect credential. the user should have a machine qualifier in front of it. so "/user: desktopPC\zuka"
Upvotes: 0