# is-admin

> Check if the process is running as administrator on Windows

Latest version **4.0.0** (published 2021-08-11) · MIT license · 0 weekly downloads

## Install

```sh
npm install is-admin
pnpm add is-admin
yarn add is-admin
bun add is-admin
```

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 4.0.0 |
| Published | 2021-08-11 |
| First published | 2015-05-02 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM |
| Node | ^12.20.0 \|\| ^14.13.1 \|\| >=16.0.0 |
| Dependencies | 1 |
| Unpacked size | 3.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 39 |
| Author | Sindre Sorhus |
| Maintainers | sindresorhus |
| Keywords | admin, administrator, windows, win32, process, running, cmd, shell, command-line, check, detect, is, root |

## Links

- npm: https://www.npmjs.com/package/is-admin
- Repository: https://github.com/sindresorhus/is-admin
- Homepage: https://github.com/sindresorhus/is-admin#readme
- Issues: https://github.com/sindresorhus/is-admin/issues
- Funding: https://github.com/sponsors/sindresorhus
- npm.io page: https://npm.io/package/is-admin

## Dependencies (1)

- [execa](https://npm.io/package/execa.md) ^5.1.1

## Alternatives

- [memory-cache](https://npm.io/package/memory-cache.md) — 795.0K weekly downloads
- [@httptoolkit/proxy-agent](https://npm.io/package/@httptoolkit/proxy-agent.md) — 11.2K weekly downloads
- [express-cache-controller](https://npm.io/package/express-cache-controller.md) — 5.3K weekly downloads
- [http-cache-middleware](https://npm.io/package/http-cache-middleware.md) — 4.5K weekly downloads
- [cache2](https://npm.io/package/cache2.md) — 1.5K weekly downloads

## Recent versions

- 4.0.0 (latest) — 2021-08-11
- 3.0.0 — 2019-04-19
- 2.1.1 — 2017-05-07
- 2.1.0 — 2017-03-15
- 2.0.0 — 2016-05-03
- 1.0.2 — 2015-05-02

## README

# is-admin

> Check if the process is running as administrator on Windows

## Install

```
$ npm install is-admin
```

## Usage

```js
import isAdmin from 'is-admin';

console.log(await isAdmin());
//=> false
```

## API

### isAdmin()

Returns a `Promise<boolean>` indicating whether the process is running as administrator.

## Related

- [is-elevated](https://github.com/sindresorhus/is-elevated) - Check if the process is running with elevated privileges *(cross-platform)*

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