PHP Classes
elePHPant
Icontem

SimpleWMI: Access Windows resources using WMI objects

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Info   View files Documentation   View files View files (2)   DownloadInstall with Composer Download .zip   Reputation   Support forum (3)   Blog    
Last Updated Ratings Unique User Downloads Download Rankings  
2009-12-30 (5 years ago) RSS 2.0 feedNot enough user ratingsTotal: 1,460 All time: 2,540 This week: 1,083Up
Version License PHP version Categories  
simplewmi 2.0GNU General Publi...5Windows
Description Author  

This class can be used to access Windows resources using WMI objects.

It creates a WMI scripting COM object to access Win32, registry, SMS and other WMI providers.

The class can set parameters, execute queries to the WMI provider and return the results as arrays.

Innovation Award  
PHP Programming Innovation award nominee
June 2008
Number 6


Prize: One book of choice by Packt
Windows provides an API of objects named WMI (Windows Management Instrumentation) that can be used to manage hardware devices such as network cards.

This class provides a simplified API to use WMI objects and manage hardware on Windows system from PHP.

Manuel Lemos
Picture of Zsolt Munoz
Name: Zsolt Munoz <contact>
Classes: 6 packages by
Country: Canada Canada
Age: 35
All time rank: 72620 in Canada Canada
Week rank: 1533 Down32 in Canada Canada Down
Innovation award
Innovation award
Nominee: 2x

Details provided by the author  
For more references around this please visit http://msdn.microsoft.com/en-us/library/aa394582(VS.85).aspx

This is just a simple document around running the EasyWMI class and how to use it.
// Create new Instance of the EasyADSI Class
$test = new EasyWMI('servername','user','password','namespace','domain');

// Choose classname
$test->useTable('classname');

// Create Selection
$test->setSelection('*');

// Set Search Critria
$test->setWhere("Name = 'Info'");

// Run Selection
$test->select();

// Get Record Set in an Array
$array = $test->fetchAssoc();

// Get Field Names in an array
$field = $test->fetchFieldName();

// Free form query
$test->setQuery("SELECT * FROM Win32_NetworkAdapter WHERE IPAddress = '1.2.3.4'");
  Files folder image Files  
File Role Description
Plain text file class.simplewmi.php Class SimpleWMI
Accessible without login Plain text file doc.txt Doc. Document

 Version Control Unique User Downloads Download Rankings  
 0%Total:1,460All time:2,540
 This week:0This week:1,083Up
 User Comments (2)  
 
Useless.
4 years ago (Armando Poveda)
12%Star
Very good class.
7 years ago (Benjamin)
62%StarStarStarStar