All Projects → bitsofinfo → Powershell Command Executor

bitsofinfo / Powershell Command Executor

node.js module that provides a registry and gateway for execution powershell commands through long-lived established remote PSSessions

Programming Languages

javascript
184084 projects - #8 most used programming language
powershell
5483 projects

Projects that are alternatives of or similar to Powershell Command Executor

Express Boilerplate
🚀 Starter project for a RESTful API in Node with Express & mongoose component-based
Stars: ✭ 9 (-68.97%)
Mutual labels:  rest-api
Restforms
Forms adapter for InterSystems Cache
Stars: ✭ 14 (-51.72%)
Mutual labels:  rest-api
Hoppscotch
👽 Open source API development ecosystem https://hoppscotch.io
Stars: ✭ 34,569 (+119103.45%)
Mutual labels:  rest-api
Spring Boot Rest Api Example
Implement REST APIs using Spring Boot and Spring Session.
Stars: ✭ 10 (-65.52%)
Mutual labels:  rest-api
Rest Api Examples
Test and Prototype with Fake Online REST/OAuth 2 APIs Examples
Stars: ✭ 13 (-55.17%)
Mutual labels:  rest-api
E Commerce 2 django
Guest register, user register, user login, user logout, account home page, product view history, change password, reset password, change name, send activation email when register, resend activation email, add shipping address, add billing address, add nickname to the addresses, edit shipping address, edit billing address, view list of your addresses, reuse shipping addresses when order products, reuse billing addresses when ordeer products, show sales analytics if staff or admin only using -chart.js-, get analytics data with Ajax, receive marketing email, change if user will receive marketing email or not by admin, send contact message with Ajax, products list, product detail, download product detail as a PDF file, download digital product files -if the user purchased that digital product only-, orders list, list of digital products files, order detail, download order detail as a PDF file, verify order ownership with Ajax -to secure order detail page-, show cart products, add or remove product from cart, checkout page, thanks page when order placed successfully, add or reuse payment method, add or reuse payment method with Ajax, search products by title, search products by description, search products by price, search products by tag title, write tags for products -by admin only-, auto fill contact email, full name if user logged in.
Stars: ✭ 20 (-31.03%)
Mutual labels:  rest-api
Detor
🙊 A simple REST API to identify requests made from TOR network.
Stars: ✭ 26 (-10.34%)
Mutual labels:  rest-api
Fast bitrix24
Высокопроизводительный API wrapper для Питона для быстрого массового обмена данными с Битрикс24 через REST API
Stars: ✭ 28 (-3.45%)
Mutual labels:  rest-api
Swagger Editor
Swagger Editor
Stars: ✭ 7,365 (+25296.55%)
Mutual labels:  rest-api
Play Zhewbacca
Play! framework library to protect REST endpoint by OAuth2 token verification. Supports Play versions 2.5, 2.6, 2.7
Stars: ✭ 21 (-27.59%)
Mutual labels:  rest-api
Symfony Api Skeleton
rest api skeleton based on symfony-flex, api-platform, fosuserbundle etc.
Stars: ✭ 11 (-62.07%)
Mutual labels:  rest-api
Sentence Aligner Rust
rest service + frontend to align sentences , in rust
Stars: ✭ 13 (-55.17%)
Mutual labels:  rest-api
Rest Client
Stars: ✭ 20 (-31.03%)
Mutual labels:  rest-api
Flask Scaffold
Prototype Database driven Web apps in Angular 6, Bootstrap 4 and REST API's with Flask (Python 3 framework)
Stars: ✭ 853 (+2841.38%)
Mutual labels:  rest-api
Elasticsearch Java Rest
Elasticsearch Java Rest 手册
Stars: ✭ 27 (-6.9%)
Mutual labels:  rest-api
Swagger Core
Examples and server integrations for generating the Swagger API Specification, which enables easy access to your REST API
Stars: ✭ 6,898 (+23686.21%)
Mutual labels:  rest-api
Apps Android Wikiedudashboard
Access WikiEdu Dashboard from Android App.
Stars: ✭ 20 (-31.03%)
Mutual labels:  rest-api
Djangorestframework Book
Django REST framework 3 中文文档, API参考, 最佳实践指南
Stars: ✭ 28 (-3.45%)
Mutual labels:  rest-api
Liberator
An Elixir library for building RESTful applications.
Stars: ✭ 28 (-3.45%)
Mutual labels:  rest-api
Boilerplate Nodejs Swagger
A Node.js RESTful API application boilerplate with TypeScript, Docker, Koa, Swagger, Jest, and CircleCI
Stars: ✭ 21 (-27.59%)
Mutual labels:  rest-api

powershell-command-executor

Node.js module that provides a registry and gateway for execution of pre-defined powershell commands through long-lived established remote PSSessions.

NPM

Overview

This Node.js module builds on top of stateful-process-command-proxy to provide a higher level API for a registry of pre-defined commands, specifically for various powershell operations agains Office365; or any powershell command really, you just need to configure them. The module provides a simplified interface to pass arguments to various "named" commands, sanitize the arguments and return the results. This module supports concepts that would permit the construction of a higher level interface to this system, such as via a REST API or user interface... see powershell-command-executor-ui for a working example of this concept in an useable implementation.

Alt text

Concepts

psCommandExecutor.js

This provides the PSCommandService class which is a wrapper around StatefulProcessCommandProxy which lets a caller invoke "named" commands passing an map/hash of arguments. PSCommandService will generate the actual command and pass it to the StatefulProcessCommandProxy for execution and return the results. PSCommandService must be created passing an configured instance of StatefulProcessCommandProxy and a "registry" of commands. You can see an example of what a command registry looks like within o365Utils.js. You don't have to use the latter registry.. you can create your own or just augment it with your own set of commands that you want to make available through PSCommandService.

o365Utils.js

This script simply exports a few useful pre-defined parameter sets (that one would pass to the constructor of StatefulProcessComamndProxy) for the initialization, destruction and auto-invalidation of "powershell" processes who connect to o365 and establish a remote PSSession that will be long lived. (and validate that the session is still legit)

Exchange authentication

o365Utils.js init command getO365PSInitCommands is using a deprecated authentication method

Mictosoft has added Exchange Online PowerShell V2 that supports cerificate based authentication.

Full setup is descibed here

Three sets of init commands are availiable as of version 1.1.0:

  • getO365PSInitCommands - backward compatible old basic authentication
  • getO365PSKeyInitCommands - new Exchange authentication with private key and password
  • getO365PSThumbprintInitCommands - new Exchange authentication with the thumb print for the certificate

Usage

  1. Configure your o365 tenant with a user with the appropriate permissions to manage o365 via Powershell. See this article to get going

  2. Use powershell-credential-encryption-tools to create an encrypted credentials file and secret key for decryption. SECURE these files!

  3. From within this project install the necessary npm dependencies for this module, including stateful-process-command-proxy. You can checkout the latter manually and do a npm install stateful-process-command-proxy

  4. Configure example.js/example_key_auth.js/examplekey_thumb_auth.js appropriately, in particular the initCommands for the StatefulProcessCommandProxy; the paths to the items you created via the second step above

  5. Tweak the group that is fetched at the bottom of example.js/example_key_auth.js/examplekey_thumb_auth.js

  6. There is also a unit-test (test\all.js) for the command registry in o365Utils.js which gives an example of usage for all thre possible Exchange connect variations.

History

v1.1.1 - 2020-12-07
    - Fixed bug import of custom commands if provided for certificate based auth

v1.1.0 - 2020-12-03
    - Added option for key and thumbprint based Exchange authentication

v1.0.0 - 2016-06-08
    - Get-DistributionGroupMember - added "-ResultSize Unlimited"

v1.0-beta.7 - 2015-02-10
    - Add semi-colins to sanitization

v1.0-beta.6 - 2015-02-06
    - Bug fix to injection

v1.0-beta.5 - 2015-02-06
    - Further improvement for argument injection

v1.0-beta.4 - 2015-02-05
    - Fixes to quote sanitization, bug fixes

v1.0-beta.3 - 2015-01-30
    - Tweaks to init commands

v1.0-beta.2 - 2015-01-28
    - Whitelisting of commands

v1.0-beta.1 - 2015-01-28
    - Initial version

Related Tools

Have a look at these related projects which support and build on top of this module to provide more functionality

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].