- May
- 13,149
- 180
Having enabled remote WMI on my work computer, being connected via a VPN, and having the same credentials on both machines, I can, with an elevated PowerShell, do the likes of
Most ok that command line I got from the web. I know very little about SQL.
On the local computer, I can do the same with @WMI.
Does anyone know if there's a syntax for specifying the remote machine with @WMI?
Code:
V:\> Get-WmiObject -Namespace "root\cimv2" -query 'select commandline from Win32_process where ProcessId = 3752' -Impersonation 3 -ComputerName lucky
CommandLine : d:\tc14\tcc.exe /q
On the local computer, I can do the same with @WMI.
Code:
v:\> echo %@wmi[root\cimv2,select CommandLine from Win32_process where ProcessId
= ...]
Does anyone know if there's a syntax for specifying the remote machine with @WMI?