how to use WMI on Remote PC

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

Post Reply
User avatar
AUGE_OHR
Posts: 2117
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany

how to use WMI on Remote PC

Post by AUGE_OHR »

hi,

you can get a lot of PC Information use WMI
to use it for Remote PC you need to enable "winrm" Service on Remote PC

try Powershell on Remote PC and check with

Code: Select all

get-service winrm
If it is stopped, type:

Code: Select all

enable-PSRemoting -force
Add access permission to the remote host.

Code: Select all

winrm s winrm/config/client '@{TrustedHosts="REMOTECOMPUTERNAME/IP"}'
REMOTECOMPUTERNAME = Name "see" under Network
IP = 192.xxx.xxx.xxx

---

also Windows Firewall is blocking the Remote Access.
goto Firewall and select WMI
WMI_Firewall.JPG
WMI_Firewall.JPG (237.29 KiB) Viewed 11013 times
when all is enable try

Code: Select all

get-wmiobject CIM_Memory -computername "RemoteName" -credential "username"
you will ask for Password ... and hope now you got access of Memory Information
have fun
Jimmy
Post Reply