# windows-server-admin

> An npm package to perform various operations in a remote windows server with admin rights.

Latest version **1.0.11** (published 2019-03-13) · MIT license · 0 weekly downloads

## Install

```sh
npm install windows-server-admin
pnpm add windows-server-admin
yarn add windows-server-admin
bun add windows-server-admin
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.11 |
| Published | 2019-03-13 |
| First published | 2018-10-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 375.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Maintainers | francisminu |
| Keywords | iis, start, stop, windows, service, site, restart, iis start site, windows service start/stop, iisrestart, windows, background service, stop iis site, sc, windows service |

## Links

- npm: https://www.npmjs.com/package/windows-server-admin
- Repository: https://github.com/francisminu/IISRESET-npm-package
- Homepage: https://github.com/francisminu/IISRESET-npm-package#readme
- Issues: https://github.com/francisminu/IISRESET-npm-package/issues
- npm.io page: https://npm.io/package/windows-server-admin

## Alternatives

- [@opentelemetry/exporter-zipkin](https://npm.io/package/@opentelemetry/exporter-zipkin.md) — 14.8M weekly downloads
- [pusher-js](https://npm.io/package/pusher-js.md) — 2.0M weekly downloads
- [browserify](https://npm.io/package/browserify.md) — 1.7M weekly downloads
- [sqs-consumer](https://npm.io/package/sqs-consumer.md) — 1.7M weekly downloads
- [@sanity/eventsource](https://npm.io/package/@sanity/eventsource.md) — 930.8K weekly downloads

## Recent versions

- 1.0.11 (latest) — 2019-03-13
- 1.0.10 — 2019-02-27
- 1.0.9 — 2019-02-27
- 1.0.8 — 2019-02-27
- 1.0.7 — 2018-11-13
- 1.0.6 — 2018-11-07
- 1.0.5 — 2018-10-29
- 1.0.4 — 2018-10-26
- 1.0.3 — 2018-10-26
- 1.0.2 — 2018-10-26
- 1.0.1 — 2018-10-26
- 1.0.0 — 2018-10-26

## README

# windows-server-admin
An npm package to perform various operations on windows server with admin rights.
The package handles the execution of commands with admin rights and therefore, can be used directly without running in Administrator mode.

## Getting Started

## Features

1. Start IIS Site
2. Stop IIS Site
3. Start a windows service
4. Stop a windows service
5. Execute any command in remote Windows server


## Installation

npm i windows-server-admin

## Usage

Once installed using npm, require/import the module in the respective file.

    var serverAdmin = require('windows-server-admin');

#IIS Actions:

Call the method:
    performIISOperations with data as the parameter

The format of data to be passed is as follows:

    let data = {
        "action": "", -- the values expected are: start/stop
        "username": "",
        "password": "",
        "serverIpAddress": "",
        "name": ""
    };

Now, make a call to the method performIISOperations inside the package as given below:

serverAdmin.performIISOperations(data,(err, stdout, stderr) => {
	console.log('Response: ', err;
});

#Windows Service Operations:

Call the method:
    performWindowsServiceOperations with data as the parameter

The format of data to be passed is as follows:

    let data = {
        "action": "", -- the values expected are: start/stop
        "username": "",
        "password": "",
        "serverIpAddress": "",
        "name": ""
    };

Now, make a call to the method performWindowsServiceOperations inside the package as given below:

serverAdmin.performWindowsServiceOperations(data,(err, stdout, stderr) => {
	console.log('Response: ', err;
});


#Remote Commands on Windows Servers:

Call the method:
    performRemoteCommands with data as the parameter

The format of data to be passed is as follows:

    let data = {
        "username": "",
        "password": "",
        "serverIpAddress": "",
        "name": "",
        "directory": "",-- Example: "c:\\windows\\system32\\sc"
        "command": "" -- Example: "stop serviceName"
    };

Now, make a call to the method performRemoteCommands inside the package as given below:

serverAdmin.performRemoteCommands(data,(err, stdout, stderr) => {
	console.log('Response: ', err; // if err is null, success
});

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