
Once you have node.js talking to stateful-process-command-proxy, you can build whatever you want on top of that in node.js to mediate the calls. Hence this is how stateful-process-command-proxy came to be… it provides the building block bridge between node.js and a pool of pre-established Powershell consoles.


Lastly, who wants to actually sit there and manually run these commands when they could be automated and invoked on demand via other means… such as via a web-service etc. and establishing (and tearing down) a new remote PSSession whenever you need to invoke a cmdlet against a remote resource (remote server, or o365 endpoint) is expensive. Secondly when you need to do these operations via Powershell, its requires a per-established remote PSSession to o365…. Unfortunately Microsoft’s GraphAPI, does not expose all of the functionality that is available via its suite of various Powershell cmdlets for o365 services. The use case came out of the need to automate certain calls to manage various objects within Microsoft o365’s environment. (Note, what is described below could just as easily be built for Bash processes as well as the underlying module supports it) Why would one want to do this you ask? Well I’ve covered this in my last post but I will briefly explain it here. Building on my last post on stateful-process-command-executor this post will cover how you can leverage that node.js module to expose the capabilities of Powershell cmdlets over a REST api presented through an AngularJS interface.
