In the last post we started building the app, but ran into a problem with output. We were able to get output from some scripts (dir, for example, gave incomplete output), but others didn’t give us anything useful at all (get-service, returned “System.ServiceProcess.ServiceController” over and over). The reason for this is simple. PowerShell cmdlets (and [...]
Archive of entries posted on October 2009
Writing your own PowerShell Hosting App (Part 2)
In the last post, I discussed some of the reasons why you might want to write your own PowerShell hosting app. I realized later that I didn’t define what that meant. In general, there are 2 ways to include PowerShell technology in an application. Use the PowerShell objects (in the System.Management.Automation.* namespaces) to execute scripts, [...]
Writing your own PowerShell Hosting App (Part 1. Introduction)
I’ve mentioned before that I use a homegrown PowerShell host in my work. I have been more than pleasantly surprised at how easy and how rewarding this is. In the last few weeks, I’ve seen a few articles that have gotten me thinking about writing a series of blog posts about how to get started. [...]