Writing your own PowerShell Hosting App (part 6…the final episode)

Before we proceed with putting powershell objects in a treeview (which I promised last time), I need to explain some changes I have made to the code. Refactoring the InvokeString functionality ouf of the menu item event Merging the error stream into the output stream Replacing the clear-host function with a custom cmdlet First, we …

Continue reading ‘Writing your own PowerShell Hosting App (part 6…the final episode)’ »

Writing your own PowerShell Hosting App (part 5)

In the last post, we got to the point that we were actually using the new host objects that we implemented, but we still hadn’t provided anything more than trivial implementations (throwing an exception) for the methods that make a custom host useful, e.g. the write-* functions. Before we do that, we need to discuss …

Continue reading ‘Writing your own PowerShell Hosting App (part 5)’ »

Writing your own PowerShell Hosting App (Part 4)

WARNING:  This is a long post with lots of code!  🙂 In the last post, we got to the point that we ran into the limitatoin of simply running scripts through a bare runspace. You can accomplish quite a bit, but to have the full shell experience, you’ll want to actually create a the host …

Continue reading ‘Writing your own PowerShell Hosting App (Part 4)’ »