WMI & WinRM
WMI
wmic (deprecated)
wmic /node:192.168.50.73 /user:jen /password:Nexus123! process call create "calc"Via Powershell
$username = '<USER>';
$password = '<PASS>!';
$secureString = ConvertTo-SecureString $password -AsPlaintext -Force;
$credential = New-Object System.Management.Automation.PSCredential $username, $secureString;
$options = New-CimSessionOption -Protocol DCOM
$session = New-Cimsession -ComputerName <IP> -Credential $credential -SessionOption $Options
$command = '<COMMAND>';
Invoke-CimMethod -CimSession $Session -ClassName Win32_Process -MethodName Create -Arguments @{CommandLine =$Command};WinRM
winrs
Via powershell
Last updated