0.5.0 • Published 6 years ago

wmi-client v0.5.0

Weekly downloads
192
License
MIT
Repository
github
Last release
6 years ago

wmi-client

Wrapper around the WMI client. Linux and Windows WMI clients are supported.

Wmic binaries for Ubuntu and CentOS are included.

Install

npm install wmi-client

Usage

var WmiClient = require('wmi-client');

Two ways to create a new client instance:

// WINDOWS ONLY!
var wmi = new WmiClient();
var wmi = new WmiClient({
    username: 'LOGIN',
    password: 'PASSWORD',
    host: 'IP-ADDRESS',
    ntlm2: true, // only for linux
    
    // OPTIONAL
    // ---------------------------------------------------------------
    // The client is spawned with this location as cwd.
    // NOTE that csv.xsl (see lib/csv.xsl) has to exist in 
    // lib/csv.xsl relative to that location!
    cwd: 'path to target location',
});

Query the client:

wmi.query('SELECT Caption,Version FROM Win32_OperatingSystem', function (err, result) {
    console.log(result);
    
    /*
    RESULT:
      [{
        Caption: 'Microsoft Windows Server 2008 R2 Enterprise',
        Version: '6.1.7601'
      }]
    */
});
0.5.0

6 years ago

0.4.1

8 years ago

0.4.0

8 years ago

0.3.0

9 years ago

0.2.0

10 years ago

0.1.5

10 years ago

0.1.4

10 years ago

0.1.3

10 years ago

0.1.2

10 years ago

0.1.0

10 years ago

0.0.2

10 years ago

0.0.1

10 years ago