Automating the world one-liner at a time…
Roberto Farah runs a Debugging Toolbox blog and recently got turned onto PowerShell. He has now written a set of PowerShell functions (PowerDbg Library) which allows PowerShell to control WinDbg. The effect is (almost) the same as if WinDbg had embedded PowerShell as its own scripting language. Roberto considered a couple approaches before deciding to leverage the WScript.Shell com object and the SendKeys method to get the job done. (Note to self – learn more about what things can be done with this approach.).
One note on style/naming. Roberto's functions put his library name at the beginning of the name:
As a general rule, we encourage people to include their product name or some facility code as part of their cmdlet/function name to avoid naming collisions. The correct way to do this is to make it part of the NOUN not the verb. As such, the names should be in the form:
Other than that, this stuff is great! Check out this very cool stuff HERE.
Jeffrey Snover [MSFT]Windows Management Partner ArchitectVisit the Windows PowerShell Team blog at: http://blogs.msdn.com/PowerShellVisit the Windows PowerShell ScriptCenter at: http://www.microsoft.com/technet/scriptcenter/hubs/msh.mspx
It seems putting the package name first would make it easier to find commands from certain packages with tab completion.
(ex. I know I want a command from PowerDbg but I can't remember which one)
PingBack from http://msdnrss.thecoderblogs.com/2007/09/09/controlling-windbg-with-powershell/
I just changed the function names according to your comments.
Thanks for the article!