I guess I never really left, but it seems like it has been just about forever since I have written PowerShell. I have been playing around with a module for running Python scripts remotely from PowerShell.... why?  More like, why not?

The goal was to remove the need for a remote agent in a scheduler application. The scheduler speaks Python with the help of an agent for Linux, but it speaks PowerShell all the time with no help from others. Because the agent(s) cost a bit of money, I thought it would be an interesting exercise to roll my own agent. Not because I wanted to avoid paying licensing at all, but to allow agents to be used for situations where the agent will provide a benefit - just something that is kicking a workload off on a remote machine, why not use PowerShell.

This is still a work in progress, because it has been forever since I have written much in PowerShell - have been off in the Google Cloud (might have something to say about the PowerShell support for GCP - limited, but available) and PowerShell has been a bit of an afterthought.

Back to the idea of the PythonShell... a connection using a remote server is created and the python libraries and exes are loaded there - then the scheduler just kicks off the job and PowerShell remoting does the rest. Yep it is just a python call, but it supports the passing of arguments and the values they need. Once I get this all fleshed out/cleaned up/running as I expect, I might even detail it here and go through all the ins and outs of the "PowerShell Agent".

Am I nuts for taking on the work of building an agent in PowerShell? Probably, and the code could probably be cleaner, hopefully as I get back to working on it, Ill get some cleanup done. I do need to get my head around source control and Git as I still have trouble with it and ensuring I can store source somewhere.

Have you written PowerShell to handle something that other application(s) might already do, just because you'd rather use PowerShell?