phpwintools / wmi-scripting
A PHP package for using WMI tools.
Requires
- php: ^7.1.3
- ext-com_dotnet: *
- ext-json: *
- illuminate/contracts: ^5.8
- tightenco/collect: ^5.8
Requires (Dev)
- fzaninotto/faker: ^1.4
- mockery/mockery: ^1.0
- phpunit/phpunit: ^7.5
- dev-master
- 0.1.1-alpha
- 0.0.1-alpha
- dev-dependabot/npm_and_yarn/express-4.18.2
- dev-dependabot/npm_and_yarn/qs-6.5.3
- dev-dependabot/npm_and_yarn/decode-uri-component-0.2.2
- dev-dependabot/npm_and_yarn/terser-4.8.1
- dev-dependabot/npm_and_yarn/eventsource-1.1.1
- dev-dependabot/npm_and_yarn/url-parse-1.5.10
- dev-dependabot/npm_and_yarn/prismjs-1.27.0
- dev-dependabot/npm_and_yarn/follow-redirects-1.14.8
- dev-dependabot/npm_and_yarn/ajv-6.12.6
- dev-dependabot/npm_and_yarn/tar-4.4.19
- dev-dependabot/npm_and_yarn/path-parse-1.0.7
- dev-dependabot/npm_and_yarn/postcss-7.0.36
- dev-dependabot/npm_and_yarn/ws-6.2.2
- dev-dependabot/npm_and_yarn/dns-packet-1.3.4
- dev-dependabot/npm_and_yarn/browserslist-4.16.6
- dev-dependabot/npm_and_yarn/lodash-4.17.21
- dev-dependabot/npm_and_yarn/ssri-6.0.2
- dev-dependabot/npm_and_yarn/elliptic-6.5.4
- dev-dependabot/npm_and_yarn/ini-1.3.7
- dev-dependabot/npm_and_yarn/http-proxy-1.18.1
- dev-dependabot/npm_and_yarn/websocket-extensions-0.1.4
- dev-dependabot/npm_and_yarn/acorn-6.4.1
- dev-drivers
- dev-events
This package is auto-updated.
Last update: 2024-12-11 08:29:43 UTC
README
Current Version: 0.1.1-alpha
This is currently under heavy development and no release candidate has be marked at this point. You are free to use this in production with relatively low-risk as the library itself is fully functional, and is READ-ONLY so there should be no side-effects from its usage.
Documentation (WIP)
Install
composer require phpwintools/wmi-scripting
Basic Usage
Basic usage is to call ::query($connection = null)
on an available model from
https://github.com/phpwintools/wmi-scripting/tree/master/src/WmiScripting/Models.
PhpWinTools\WmiScripting\Models\LoggedOnUser::query()->get();
This returns a collection of logged on users from the default connection (this is local by configuration).
The ModelCollection
extends https://github.com/tightenco/collect / Laravel Collections.
You can also instantiate Scripting
:
$scripting = new PhpWinTools\WmiScripting\Scripting;
$scripting->addConnection('remote', PhpWinTools\WmiScripting\Connection::simple('server', 'user', 'password'));
$scripting->query('remote')->loggedOnUser()->get();
Whether you use $scripting->query($connection = null)->modelName()
or ::query($connection = null)
you are dropped into a basic query
builder which currently only allows select
and where
clauses. If there are any subject matter experts who would like
to guide me on how this query builder should look please contact me.
Testing
This is still an area that is under development.
You can call Scripting::fake($testCase)->win32Model($class_name);
to create a fake for testing without
actually creating a real connection to a WMI service.