🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

powershell-credentials

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

powershell-credentials

Read stored credentials from a CliXML file, and transform them to a JavaScript object. Requires node-powershell.

0.1.2
latest
Source
npm
Version published
Weekly downloads
9
200%
Maintainers
1
Weekly downloads
 
Created
Source

powershell-credentials

Read stored credentials from a CliXML file, and transform them to a JavaScript object. Requires node-powershell.

Install

npm install --save powershell-credentials

Usage

  • Create a set of stored credentials as a CliXML file in PowerShell using the Get-Credential and Export-Clixml commands.
  • Import the credentials into your Node.js project as a JavaScript object with keys user and pass.
  • Use those credentials wherever your project requires them.

PowerShell

$Credentials = Get-Credential
$Credentials | Export-Clixml ./path/to/credentials.xml

index.js

import { readCredentials } from 'powershell-credentials'

(async () => {
    let credentials = await readCredentials('./path/to/credentials.xml')
    console.log(credentials)
})()

Keywords

powershell

FAQs

Package last updated on 15 Apr 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts