# wmi-client

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

Latest version **0.5.0** (published 2019-03-25) · MIT license · 0 weekly downloads

## Install

```sh
npm install wmi-client
pnpm add wmi-client
yarn add wmi-client
bun add wmi-client
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; large bundle; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.5.0 |
| Published | 2019-03-25 |
| First published | 2015-04-21 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 18 MB |
| Known vulnerabilities | 0 |
| Install scripts | yes |
| GitHub stars | 32 |
| Author | Nickolay Alexandrov |
| Maintainers | dos, notmedia, stainful, zmeevsky |
| Keywords | wmi, wmic |

## Links

- npm: https://www.npmjs.com/package/wmi-client
- Repository: https://github.com/R-Vision/wmi-client
- Issues: https://github.com/R-Vision/wmi-client/issues
- npm.io page: https://npm.io/package/wmi-client

## Recent versions

- 0.5.0 (latest) — 2019-03-25
- 0.4.1 — 2017-11-20
- 0.4.0 — 2017-05-18
- 0.3.0 — 2016-03-12
- 0.2.0 — 2015-08-27
- 0.1.5 — 2015-07-23
- 0.1.4 — 2015-07-09
- 0.1.3 — 2015-07-08
- 0.1.2 — 2015-06-26
- 0.1.0 — 2015-06-23
- 0.0.2 — 2015-04-21
- 0.0.1 — 2015-04-21

## README

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

Wmic binaries for Ubuntu and CentOS are included.

### Install
```bash
npm install wmi-client
```

### Usage
```javascript
var WmiClient = require('wmi-client');
```
Two ways to create a new client instance:

```javascript
// WINDOWS ONLY!
var wmi = new WmiClient();
```

```javascript
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:
```javascript
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'
      }]
    */
});
```

---
_Source: https://npm.io/package/wmi-client · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
