Skip to content

A Node.js server for executing PowerShell scripts and commands via HTTP requests. This repository provides a convenient way to run and manage PowerShell scripts using a simple Node.js server. 💡💻

Notifications You must be signed in to change notification settings

howaboutsalman/PowerShell-Script-Runner-NodeJS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Welcome to the PowerShell Runner!

Table of Contents

Installation

npm install

Development

npm run dev

Production

npm start

Testing Node.js Server with Postman

  1. Open Postman.

  2. Create a new request:

    • Set the request type to POST.
    • Enter the URL: http://localhost:<PORT>/run.
  3. In the Headers tab, add a new header:

    • Key: Content-Type
    • Value: application/json
  4. Switch to the Body tab, select the raw option, and enter the JSON data for your request.

    • For running a script:

      {
        "path": "your_script_path.ps1"
      }
    • For running a command:

      {
        "command": "Get-Process"
      }

    Make sure to replace "your_script_path.ps1" with the actual path to your PowerShell script.

  5. Click the "Send" button to make the request.

  6. Check the response in the "Body" section of the response to see the output of your PowerShell script or command.

About

A Node.js server for executing PowerShell scripts and commands via HTTP requests. This repository provides a convenient way to run and manage PowerShell scripts using a simple Node.js server. 💡💻

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published