Launching Python from PowerShell
So far, the approach to integrating Python with PowerShell has been to launch PowerShell scripts from Python as a subprocess. In this chapter, the roles will be reversed, and PowerShell will feed data to Python scripts. One of the key elements of PowerShell is pipelining the process of transferring the results of one CmdLet to the next. With that in mind, why not treat Python as just another pipeline element and execute Python scripts driven by data acquired by PowerShell?