await-powershell

1.0.7 • Public • Published

Description

Microsoft Powershell wrapped in a Promise for doing async/await.

Install

$ npm install await-powershell
$ yarn add await-powershell

Usage

const Powershell = require('await-powershell')

;(async () => {
  try {
    const ps = await Powershell('Get-TimeZone')
    console.log(ps)
  } catch (error) {
    console.error(error)
  }
})()

or

const Powershell = require('await-powershell')

;(async () => {
  await Powershell('Get-TimeZone')
    .then((data) => {
      console.log(data)
    })
    .catch((error) => {
      console.log(error)
    })
})()

License

MIT

Package Sidebar

Install

npm i await-powershell

Weekly Downloads

5

Version

1.0.7

License

MIT

Unpacked Size

3.56 kB

Total Files

4

Last publish

Collaborators

  • krbotnet