tisantan / php-wbemscripting
Connect into any windows machine using COM extension and WbemScripting
Installs: 2
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 0
Type:project
Requires
- php: >=7.1.0
- ext-com_dotnet: *
This package is auto-updated.
Last update: 2025-05-29 01:38:04 UTC
README
This project is a concept that php can be used to connect with Windows machines using WMI.
Requirements
- PHP > 7.1.*;
- com_dotnet extension active;
- Windows machines: Because it uses com_dotnet extension;
- Make sure to enable WMI service on the remote machine: tutorial
Disclaimer
This library is in its initial stage and is without stability, I do not guarantee that it will work correctly on all machines.
What can you do with this?
- Connect to local & remote machines
- Get machine specs
- Create/End windows process
- Format Disk
- Even control screen brightness
- Much more coming soon...
Installation
You need to enable WMI service on your target machine
Download the files and run composer
composer install
TODO:Composer registry
composer install php-wbemscripting
Running example.php
<?php //Load required Lib require "vendor/autoload.php"; //Remote Machine //$cimv2_ = new CIMV2\Win32_Process("hostname_or_ip",'domain\username','password'); //Use WMI locally $cimv2_obj = new CIMV2\Win32_Process("."); //List machine process var_dump($cimv2_obj->getAttributes());