-- Coming soon!
You don't (just yet). The package is not quite ready ^_^
use dcone80\Wsman\Wsman;
$client = new Wsman([
'location' => "http://TARGET-HOST:5985",
'login' => 'username',
'password' => 'password',
]);
Identity target
$response = $client->identify();
Get WinRM Config
$config = $client->get('winrm/config');
Get Volume C:
$response = $client->get('wmicimv2/Win32_logicaldisk', ['DeviceId' => 'C:']);
List Windows Services:
$response = $client->enumerate('wmicimv2/Win32_Service');
Using WQL:
$params = [
'dialect' => 'WQL',
'query' => 'select * from Win32_Service WHERE DelayedAutoStart = "true"'
];
$results = $client->enumerate('wmicimv2/*', $params);
$params = [
'hDefKey' => '2147483650',
'sSubKeyName' => 'SOFTWARE\Microsoft\Windows NT\CurrentVersion',
'sValueName' => 'ProductName'
];
$response = $client->invoke('GetStringValue', 'wmi/root/default/StdRegProv', $params);
- Support for BASIC Authentication
- Support for Negotiate Authentication
- Implement Get Method
- Implement Identify Method
- Implement Enumerate Method
- Implement Invoke Method
- Implement Put Method
- Implement Delete Method
- Handle Errors and failed requests
- Use Guzzlehttp client instead of plain CURL
- Test againsts non-Windows based devices
- Handle/Remove hard-coded language tags in SOAP headers