Skip to content

Commit 3cc25c3

Browse files
committed
Update README.md
1 parent 059a07c commit 3cc25c3

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

README.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,23 @@
33
Module that provides a registry and gateway for execution of pre-defined powershell commands through long-lived established remote PSSessions.
44

55
* [Overview](#overview)
6+
* [Concepts](#concepts)
67
* [Usage](#usage)
78
* [Related tools](#related)
89

910
###<a name="overview"></a> Overview
1011

11-
This module builds on top of [stateful-process-command-proxy](https://github.com/bitsofinfo/stateful-process-command-proxy) to provide a higher level API for a registry of pre-defined commands, specifically for various powershell operations agains Office365. 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](https://github.com/bitsofinfo/powershell-command-executor-ui) for a working example.
12+
This module builds on top of [stateful-process-command-proxy](https://github.com/bitsofinfo/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](https://github.com/bitsofinfo/powershell-command-executor-ui) for a working example of this concept in an useable implementation.
13+
14+
###<a name="usage"></a> Concepts
15+
16+
### psCommandExecutor.js
17+
18+
This provides the PSCommandService class which is a wrapper around [StatefulProcessCommandProxy](https://github.com/bitsofinfo/stateful-process-command-proxy) 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](https://github.com/bitsofinfo/stateful-process-command-proxy) 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.
19+
20+
### o365Utils.js
21+
22+
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)
1223

1324
###<a name="usage"></a> Usage
1425

@@ -22,6 +33,8 @@ This module builds on top of [stateful-process-command-proxy](https://github.com
2233

2334
5) Tweak the group that is fetched at the bottom of ```example.js```
2435

36+
7) There is also a unit-test (```test\all.js```) for the command registry in ```o365Utils.js``` which gives an example of usage.
37+
2538
###<a id="related"></a> Related Tools
2639

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

0 commit comments

Comments
 (0)