<?xml version="1.0"?><?xml-stylesheet type="text/xsl" href="/rss.xsl"?><rss version="2.0"><channel><title>powerdbg Wiki &amp; Documentation Rss Feed</title><link>http://www.codeplex.com/powerdbg/Wiki/View.aspx?title=Home</link><description>powerdbg Wiki Rss Description</description><item><title>Updated Wiki: Invoke-DbgCommand</title><link>http://powerdbg.codeplex.com/wikipage?title=Invoke-DbgCommand&amp;version=1</link><description>&lt;div class="wikidoc"&gt;&lt;h1&gt;Invoke-DbgCommand&lt;/h1&gt;
Allows invoking arbitary debugger commands. This can be used to access functionality that has not been exposed with its own CmdLet, or to access the raw textual output of a command (where the cmdlet doesn&amp;#39;t support the &lt;b&gt;-raw&lt;/b&gt; switch)&lt;br /&gt;&lt;br /&gt;This cmdlet is aliased &amp;#39;idc&amp;#39;&lt;br /&gt;
&lt;h2&gt;Example&lt;/h2&gt;&lt;pre&gt;
PowerDbg 0:000&amp;gt; Load-DbgExtension sos mscorwks
PowerDbg 0:000&amp;gt; Invoke-DbgCommand !help
-------------------------------------------------------------------------------
SOS is a debugger extension DLL designed to aid in the debugging of managed
programs. Functions are listed by category, then roughly in order of
importance. Shortcut names for popular functions are listed in parenthesis.
Type &amp;quot;!help &amp;lt;functionname&amp;gt;&amp;quot; for detailed info on that function.

Object Inspection                  Examining code and stacks
-----------------------------      -----------------------------
DumpObj (do)                       Threads
DumpArray (da)                     CLRStack
...
&lt;/pre&gt;&lt;br /&gt;
&lt;h2&gt;Notes&lt;/h2&gt;&lt;ul&gt;&lt;li&gt;Command output is returned to the pipeline as a collection of strings, one per line&lt;/li&gt;
&lt;li&gt;The cmdlet returns control when the command completes in the debugger (ie the next command prompt is read). If you issue a command that will never return (eg &amp;#39;g&amp;#39; in the case of a process that subsiquently does not fail, and you have no breakpoints setup), PowerDbg will never return control to the prompt.&lt;/li&gt;
&lt;li&gt;Debugger commands that prompt for user input should be avoided.&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div class="ClearBoth"&gt;&lt;/div&gt;</description><author>piers7</author><pubDate>Mon, 15 Nov 2010 16:17:34 GMT</pubDate><guid isPermaLink="false">Updated Wiki: Invoke-DbgCommand 20101115041734P</guid></item><item><title>Updated Wiki: Home</title><link>http://powerdbg.codeplex.com/wikipage?version=30</link><description>&lt;div class="wikidoc"&gt;
&lt;p&gt;&lt;strong&gt;PowerDbg&lt;/strong&gt; is a &lt;strong&gt;PowerShell&lt;/strong&gt; library that enables you to easily create PowerShell scripts to automate a WinDbg / CDB debugging session. You can use PowerDbg for
&lt;strong&gt;Kernel Mode&lt;/strong&gt; or &lt;strong&gt;User Mode&lt;/strong&gt;, &lt;strong&gt;Post-Mortem debugging&lt;/strong&gt; or
&lt;strong&gt;Live Debugging&lt;/strong&gt; and for &lt;strong&gt;native&lt;/strong&gt; or &lt;strong&gt;managed code&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;PowerShell has several advantages over the WinDbg Scripting Language. A few of them are:
&lt;br&gt;
&lt;br&gt;
- Easier to create scripts &lt;br&gt;
- Leverage the .NET Framework &lt;br&gt;
- Debugging and tracing features &lt;br&gt;
- Code reuse through functions and cmdlets &lt;br&gt;
- Easier maintenance &lt;br&gt;
- Easier to build large scripts &lt;br&gt;
- Easier to format and display the important information&lt;/p&gt;
&lt;p&gt;Whether you&amp;rsquo;re an old hand frustrated with WinDbg scripting, or you&amp;rsquo;re having your &amp;lsquo;first memory dump&amp;rsquo; freak-out, PowerDbg is for you. And hopefully for everyone in the middle too.&lt;/p&gt;
&lt;h2&gt;News&lt;/h2&gt;
&lt;p&gt;&lt;a href="http://powerdbg.codeplex.com/wikipage?title=Version%206"&gt;Version 6&lt;/a&gt; has been released as alpha. This is a really exciting release that makes it even easier to write scripts or otherwise just hack around against the debugger, and includes the
 PowerDbgConsole, a bootstrapper designed to make setting up an interactive PowerDbg debugging session a one-liner. It&amp;rsquo;s faster, easier to use and has full 64 bit support.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://powerdbg.codeplex.com/releases/view/54096"&gt;Download it now&lt;/a&gt;
&lt;/li&gt;&lt;li&gt;&lt;a href="http://powerdbg.codeplex.com/documentation"&gt;Getting Started&lt;/a&gt; &lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;Version 6 &lt;em&gt;should &lt;/em&gt;run all Version 5 scripts without too much (any?) modifications, but that&amp;rsquo;s one of the things we&amp;rsquo;ll be testing during the alpha period. If you find any problems,
&lt;a href="http://powerdbg.codeplex.com/workitem/list/basic"&gt;shout&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://powerdbg.codeplex.com/releases/view/16314"&gt;Version 5&lt;/a&gt; is still available.&lt;/p&gt;
&lt;/div&gt;&lt;div class="ClearBoth"&gt;&lt;/div&gt;</description><author>piers7</author><pubDate>Mon, 15 Nov 2010 16:08:20 GMT</pubDate><guid isPermaLink="false">Updated Wiki: Home 20101115040820P</guid></item><item><title>Updated Wiki: New-DbgSession</title><link>http://powerdbg.codeplex.com/wikipage?title=New-DbgSession&amp;version=4</link><description>&lt;div class="wikidoc"&gt;&lt;h1&gt;New-DbgSession&lt;/h1&gt;
To use PowerDbg you must first establish a ‘session’. This establishes PowerDbg’s internal connection between a local debugger and either a memory dump, live process or remote debugger.&lt;br /&gt;&lt;br /&gt;Sessions are established using the &lt;b&gt;New-DbgSession&lt;/b&gt; cmdlet, and can be instantiated in one of four ways:&lt;br /&gt;- attach to a running process by name (&lt;b&gt;-process&lt;/b&gt;)&lt;br /&gt;- launch a process under the debugger (&lt;b&gt;-command&lt;/b&gt;)&lt;br /&gt;- opening a memory dump in the debugger (&lt;b&gt;-dump&lt;/b&gt;)&lt;br /&gt;- connecting to an existing debugger configured as a server (&lt;b&gt;-remote&lt;/b&gt;)&lt;br /&gt;&lt;br /&gt;Additionally PowerDbg can be instructed to auto-load SOS (if possible), using the &lt;b&gt;-sos&lt;/b&gt; parameter. This can only be performed if the process in question has already loaded the CLR, and so is not applicable to the -command method.&lt;br /&gt;
&lt;h2&gt;Example&lt;/h2&gt;The PowerDbg &amp;#39;unhandled exception&amp;#39; demo can be run under the debugger as follows (note the quotes which allow us to pass an argument to the process being launched):&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;
PS &amp;gt; New-DbgSession -command &amp;#39;.\blah\ManagedScenarios.exe UnhandledExceptionScenario&amp;#39;
PS &amp;gt; Send-DbgGo
...
(1104.730): CLR exception - code e0434f4d (first chance)
(1104.730): CLR exception - code e0434f4d (!!! second chance !!!)
KERNELBASE!RaiseException+0x39:
000007fe`fdedaa7d 4881c4c8000000  add     rsp,0C8h
PS &amp;gt;
&lt;/pre&gt;&lt;br /&gt;Since the the debugger &lt;i&gt;immediately&lt;/i&gt; breaks into the launched process, we have to use &lt;a href="http://powerdbg.codeplex.com/wikipage?title=Send-DbgGo&amp;referringTitle=New-DbgSession"&gt;Send-DbgGo&lt;/a&gt; to allow the process to continue on (and subsiquently fail). When creating a session to a memory dump or a remote debugger already halted at the point of interest, this would be unnecessary.&lt;br /&gt;&lt;br /&gt;Once a PowerDbg session exists you can interact with it using any of the Get-Dbg* cmdlets, or by using &lt;a href="http://powerdbg.codeplex.com/wikipage?title=Invoke-DbgCommand&amp;referringTitle=New-DbgSession"&gt;Invoke-DbgCommand&lt;/a&gt; to send commands directly.&lt;br /&gt;
&lt;h2&gt;Notes&lt;/h2&gt;&lt;ul&gt;&lt;li&gt;Each PowerShell window running PowerDbg can only support one such session at a time&lt;/li&gt;
&lt;li&gt;The session is automatically terminated when the PowerDbg module is unloaded (Remove-Module PowerDbg)&lt;/li&gt;
&lt;li&gt;The debugger is attached invasively, and so the debuggee will terminate when the session is ended&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div class="ClearBoth"&gt;&lt;/div&gt;</description><author>piers7</author><pubDate>Mon, 15 Nov 2010 16:05:44 GMT</pubDate><guid isPermaLink="false">Updated Wiki: New-DbgSession 20101115040544P</guid></item><item><title>Updated Wiki: New-DbgSession</title><link>http://powerdbg.codeplex.com/wikipage?title=New-DbgSession&amp;version=3</link><description>&lt;div class="wikidoc"&gt;&lt;h1&gt;New-DbgSession&lt;/h1&gt;
To use PowerDbg you must first establish a ‘session’. This establishes PowerDbg’s internal connection between a local debugger and either a memory dump, live process or remote debugger.&lt;br /&gt;&lt;br /&gt;Sessions are established using the &lt;b&gt;New-DbgSession&lt;/b&gt; cmdlet, and can be instantiated in one of four ways:&lt;br /&gt;- attach to a running process by name (&lt;b&gt;-process&lt;/b&gt;)&lt;br /&gt;- launch a process under the debugger (&lt;b&gt;-command&lt;/b&gt;)&lt;br /&gt;- opening a memory dump in the debugger (&lt;b&gt;-dump&lt;/b&gt;)&lt;br /&gt;- connecting to an existing debugger configured as a server (&lt;b&gt;-remote&lt;/b&gt;)&lt;br /&gt;&lt;br /&gt;Additionally PowerDbg can be instructed to auto-load SOS (if possible), using the &lt;b&gt;-sos&lt;/b&gt; parameter. This can only be performed if the process in question has already loaded the CLR, and so is not applicable to the -command method.&lt;br /&gt;
&lt;h2&gt;Example&lt;/h2&gt;The PowerDbg &amp;#39;unhandled exception&amp;#39; demo can be run under the debugger as follows (note the quotes which allow us to pass an argument to the process being launched):&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;
PS &amp;gt; New-DbgSession -command &amp;#39;C:\dev\PowerDbg\dev\src\Scenarios\ManagedScenarios\bin\Debug\ManagedScenarios.exe UnhandledExceptionScenario&amp;#39;
PS &amp;gt; Send-DbgGo
...
(1104.730): CLR exception - code e0434f4d (first chance)
(1104.730): CLR exception - code e0434f4d (!!! second chance !!!)
KERNELBASE!RaiseException+0x39:
000007fe`fdedaa7d 4881c4c8000000  add     rsp,0C8h
PS &amp;gt;
&lt;/pre&gt;&lt;br /&gt;Since the the debugger &lt;i&gt;immediately&lt;/i&gt; breaks into the launched process, we have to use &lt;a href="http://powerdbg.codeplex.com/wikipage?title=Send-DbgGo&amp;referringTitle=New-DbgSession"&gt;Send-DbgGo&lt;/a&gt; to allow the process to continue on (and subsiquently fail). When creating a session to a memory dump or a remote debugger already halted at the point of interest, this would be unnecessary.&lt;br /&gt;&lt;br /&gt;Once a PowerDbg session exists you can interact with it using any of the Get-Dbg* cmdlets, or by using &lt;a href="http://powerdbg.codeplex.com/wikipage?title=Invoke-DbgCommand&amp;referringTitle=New-DbgSession"&gt;Invoke-DbgCommand&lt;/a&gt; to send commands directly.&lt;br /&gt;
&lt;h2&gt;Notes&lt;/h2&gt;&lt;ul&gt;&lt;li&gt;Each PowerShell window running PowerDbg can only support one such session at a time&lt;/li&gt;
&lt;li&gt;The session is automatically terminated when the PowerDbg module is unloaded (Remove-Module PowerDbg)&lt;/li&gt;
&lt;li&gt;The debugger is attached invasively, and so the debuggee will terminate when the session is ended&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div class="ClearBoth"&gt;&lt;/div&gt;</description><author>piers7</author><pubDate>Mon, 15 Nov 2010 16:04:37 GMT</pubDate><guid isPermaLink="false">Updated Wiki: New-DbgSession 20101115040437P</guid></item><item><title>Updated Wiki: Load-DbgExtension</title><link>http://powerdbg.codeplex.com/wikipage?title=Load-DbgExtension&amp;version=2</link><description>&lt;div class="wikidoc"&gt;&lt;h1&gt;Load-DbgExtension&lt;/h1&gt;
Loads a debugger extension into the debugger. Having the SOS extension loaded is essential for any PowerDbg commands that work with managed objects.&lt;br /&gt;This is the equivilent of the debugger&amp;#39;s .load and .loadby commands.&lt;br /&gt;
&lt;h2&gt;Examples&lt;/h2&gt;
Loading an extension based on the location of a module loaded in the process (.loadby):&lt;br /&gt;&lt;pre&gt;
&amp;gt; Load-DbgExtension sos mscorwks
&amp;gt; Invoke-DbgCommand !help
&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Loading an extension from the debugger&amp;#39;s program directory or fully qualified path (.load):&lt;br /&gt;&lt;pre&gt;
&amp;gt; Load-DbgExtension sosex
&amp;gt; Load-DbgExtension C:\psscor2\amd64\psscor2.dll
&amp;gt; Invoke-DbgCommand !help
&lt;/pre&gt;&lt;br /&gt;
&lt;h2&gt;Notes&lt;/h2&gt;&lt;ul&gt;&lt;li&gt;You can use &lt;a href="http://powerdbg.codeplex.com/wikipage?title=Get-DbgModules&amp;referringTitle=Load-DbgExtension"&gt;Get-DbgModules&lt;/a&gt; to check which modules are loaded before executing this&lt;/li&gt;
&lt;li&gt;Using the &lt;b&gt;-sos&lt;/b&gt; parameter on &lt;a href="http://powerdbg.codeplex.com/wikipage?title=New-DbgSession&amp;referringTitle=Load-DbgExtension"&gt;New-DbgSession&lt;/a&gt; will auto-load SOS for you, if the process has the CLR loaded. This already accounts for module name differences between .Net 2 processes (mscorwks) and .Net 4 processes (CLR)&lt;/li&gt;
&lt;li&gt;&lt;a href="http://powerdbg.codeplex.com/wikipage?title=Invoke-DebuggerCommand&amp;referringTitle=Load-DbgExtension"&gt;Invoke-DebuggerCommand&lt;/a&gt; .chain will show all loaded debugger extensions&lt;/li&gt;
&lt;li&gt;Copying debugger extensions other than SOS (like SOSEX) to the matching debugger folder for the bittyness of the extension will save time&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div class="ClearBoth"&gt;&lt;/div&gt;</description><author>piers7</author><pubDate>Mon, 15 Nov 2010 16:01:54 GMT</pubDate><guid isPermaLink="false">Updated Wiki: Load-DbgExtension 20101115040154P</guid></item><item><title>Updated Wiki: Load-DbgExtension</title><link>http://powerdbg.codeplex.com/wikipage?title=Load-DbgExtension&amp;version=1</link><description>&lt;div class="wikidoc"&gt;&lt;h1&gt;Load-DbgExtension&lt;/h1&gt;
Loads a debugger extension into the debugger. Having the SOS extension loaded is essential for any PowerDbg commands that work with managed objects.&lt;br /&gt;This is the equivilent of the debugger&amp;#39;s .load and .loadby commands.&lt;br /&gt;
&lt;h2&gt;Examples&lt;/h2&gt;
Loading an extension based on the location of a module loaded in the process (.loadby):&lt;br /&gt;&lt;pre&gt;
&amp;gt; Load-DbgExtension sos mscorwks
&amp;gt; Invoke-DbgCommand !help
&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Loading an extension from the debugger&amp;#39;s program directory or fully qualified path (.load):&lt;br /&gt;&lt;pre&gt;
&amp;gt; Load-DbgExtension sosex
&amp;gt; Load-DbgExtension C:\psscor2\amd64\psscor2.dll
&amp;gt; Invoke-DbgCommand !help
&lt;/pre&gt;&lt;br /&gt;
&lt;h2&gt;Notes&lt;/h2&gt;&lt;ul&gt;&lt;li&gt;You can use Get-DbgModules to check which modules are loaded before executing this&lt;/li&gt;
&lt;li&gt;Using the &lt;b&gt;-sos&lt;/b&gt; parameter on New-DbgSession will auto-load SOS for you, if the process has the CLR loaded. This already accounts for module name differences between .Net 2 processes (mscorwks) and .Net 4 processes (CLR)&lt;/li&gt;
&lt;li&gt;&lt;a href="http://powerdbg.codeplex.com/wikipage?title=Invoke-DebuggerCommand&amp;referringTitle=Load-DbgExtension"&gt;Invoke-DebuggerCommand&lt;/a&gt; .chain will show all loaded debugger extensions&lt;/li&gt;
&lt;li&gt;Copying debugger extensions other than SOS (like SOSEX) to the matching debugger folder for the bittyness of the extension will save time&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div class="ClearBoth"&gt;&lt;/div&gt;</description><author>piers7</author><pubDate>Mon, 15 Nov 2010 16:01:30 GMT</pubDate><guid isPermaLink="false">Updated Wiki: Load-DbgExtension 20101115040130P</guid></item><item><title>Updated Wiki: New-DbgSession</title><link>http://powerdbg.codeplex.com/wikipage?title=New-DbgSession&amp;version=2</link><description>&lt;div class="wikidoc"&gt;&lt;h1&gt;New-DbgSession&lt;/h1&gt;
To use PowerDbg you must first establish a ‘session’. This establishes PowerDbg’s internal connection between a local debugger and either a memory dump, live process or remote debugger.&lt;br /&gt;&lt;br /&gt;Sessions are established using the &lt;b&gt;New-DbgSession&lt;/b&gt; cmdlet, and can be instantiated in one of four ways:&lt;br /&gt;- attach to a running process by name (&lt;b&gt;-process&lt;/b&gt;)&lt;br /&gt;- launch a process under the debugger (&lt;b&gt;-command&lt;/b&gt;)&lt;br /&gt;- opening a memory dump in the debugger (&lt;b&gt;-dump&lt;/b&gt;)&lt;br /&gt;- connecting to an existing debugger configured as a server (&lt;b&gt;-remote&lt;/b&gt;)&lt;br /&gt;&lt;br /&gt;For example, the PowerDbg &amp;#39;unhandled exception&amp;#39; demo can be run under the debugger as follows (note the quotes which allow us to pass an argument to the process being launched):&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;
PS &amp;gt; New-DbgSession -command &amp;#39;C:\dev\PowerDbg\dev\src\Scenarios\ManagedScenarios\bin\Debug\ManagedScenarios.exe UnhandledExceptionScenario&amp;#39;
PS &amp;gt; Send-DbgGo
...
(1104.730): CLR exception - code e0434f4d (first chance)
(1104.730): CLR exception - code e0434f4d (!!! second chance !!!)
KERNELBASE!RaiseException+0x39:
000007fe`fdedaa7d 4881c4c8000000  add     rsp,0C8h
PS &amp;gt;
&lt;/pre&gt;&lt;br /&gt;Since the the debugger &lt;i&gt;immediately&lt;/i&gt; breaks into the launched process, we have to use &lt;a href="http://powerdbg.codeplex.com/wikipage?title=Send-DbgGo&amp;referringTitle=New-DbgSession"&gt;Send-DbgGo&lt;/a&gt; to allow the process to continue on (and subsiquently fail). When creating a session to a memory dump or a remote debugger already halted at the point of interest, this would be unnecessary.&lt;br /&gt;&lt;br /&gt;Once a PowerDbg session exists you can interact with it using any of the Get-Dbg* cmdlets, or by using &lt;a href="http://powerdbg.codeplex.com/wikipage?title=Invoke-DbgCommand&amp;referringTitle=New-DbgSession"&gt;Invoke-DbgCommand&lt;/a&gt; to send commands directly.&lt;br /&gt;&lt;br /&gt;Note the following:
&lt;ul&gt;&lt;li&gt;Each PowerShell window running PowerDbg can only support one such session at a time&lt;/li&gt;
&lt;li&gt;The session is automatically terminated when the PowerDbg module is unloaded (Remove-Module PowerDbg)&lt;/li&gt;
&lt;li&gt;The debugger is attached invasively, and so the debuggee will terminate when the session is ended&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div class="ClearBoth"&gt;&lt;/div&gt;</description><author>piers7</author><pubDate>Mon, 15 Nov 2010 15:47:53 GMT</pubDate><guid isPermaLink="false">Updated Wiki: New-DbgSession 20101115034753P</guid></item><item><title>Updated Wiki: New-DbgSession</title><link>http://powerdbg.codeplex.com/wikipage?title=New-DbgSession&amp;version=1</link><description>&lt;div class="wikidoc"&gt;To use PowerDbg you must first establish a ‘session’. This establishes PowerDbg’s internal connection between a local debugger and either a memory dump, live process or remote debugger.&lt;br /&gt;&lt;br /&gt;Sessions are established using the &lt;b&gt;New-DbgSession&lt;/b&gt; cmdlet, and can be instantiated in one of three ways:&lt;br /&gt;- connecting to an existing debugger configured as a server (-remote)&lt;br /&gt;- opening a memory dump in the debugger (-dump)&lt;br /&gt;- launching a process under the debugger (-command)&lt;br /&gt;&lt;br /&gt;For example, the PowerDbg &amp;#39;unhandled exception&amp;#39; demo can be run under the debugger as follows:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;
PS &amp;gt; New-DbgSession -command &amp;#39;C:\dev\PowerDbg\dev\src\Scenarios\ManagedScenarios\bin\Debug\ManagedScenarios.exe UnhandledExceptionScenario&amp;#39;
PS &amp;gt; Send-DbgGo
...
(1104.730): CLR exception - code e0434f4d (first chance)
(1104.730): CLR exception - code e0434f4d (!!! second chance !!!)
KERNELBASE!RaiseException+0x39:
000007fe`fdedaa7d 4881c4c8000000  add     rsp,0C8h
PS &amp;gt;
&lt;/pre&gt;&lt;br /&gt;(Note the quotes which allow us to pass an argument to the process being launched)&lt;br /&gt;&lt;br /&gt;Since the the debugger &lt;i&gt;immediately&lt;/i&gt; breaks into the launched process, we have to use &lt;a href="http://powerdbg.codeplex.com/wikipage?title=Send-DbgGo&amp;referringTitle=New-DbgSession"&gt;Send-DbgGo&lt;/a&gt; to allow the process to continue on (and subsiquently fail). When creating a session to a memory dump or a remote debugger already halted at the point of interest, this would be unnecessary.&lt;br /&gt;&lt;br /&gt;Once a PowerDbg session exists you can interact with it using any of the Get-Dbg* cmdlets, or by using &lt;a href="http://powerdbg.codeplex.com/wikipage?title=Invoke-DbgCommand&amp;referringTitle=New-DbgSession"&gt;Invoke-DbgCommand&lt;/a&gt; to send commands directly.&lt;br /&gt;&lt;br /&gt;Note the following:
&lt;ul&gt;&lt;li&gt;Each PowerShell window running PowerDbg can only support one such session at a time&lt;/li&gt;
&lt;li&gt;The session is automatically terminated when the PowerDbg module is unloaded (Remove-Module PowerDbg)&lt;/li&gt;
&lt;li&gt;The debugger is attached invasively, and so the debuggee will terminate when the session is ended&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div class="ClearBoth"&gt;&lt;/div&gt;</description><author>piers7</author><pubDate>Mon, 15 Nov 2010 15:43:55 GMT</pubDate><guid isPermaLink="false">Updated Wiki: New-DbgSession 20101115034355P</guid></item><item><title>Updated Wiki: Documentation</title><link>http://powerdbg.codeplex.com/documentation?version=7</link><description>&lt;div class="wikidoc"&gt;
&lt;h3&gt;Current Release&lt;/h3&gt;
&lt;p&gt;The current release of PowerDbg is &lt;a href="/wikipage?title=Version%206&amp;referringTitle=Documentation"&gt;
Version 6&lt;/a&gt;. &lt;br&gt;
This is currently in alpha status whilst we attempt to determine what bugs / missing features need to be fixed before a release is worth doing.&lt;/p&gt;
&lt;h3&gt;Getting Started&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="/releases/view/54096"&gt;Download&lt;/a&gt; and &lt;a href="/wikipage?title=Setup"&gt;
Setup&lt;/a&gt; PowerDbg &lt;/li&gt;&lt;li&gt;&lt;a href="/wikipage?title=New-DbgSession&amp;referringTitle=Documentation"&gt;Establish&amp;nbsp;a PowerDbg Session&lt;/a&gt;&amp;nbsp;
&lt;/li&gt;&lt;li&gt;Use the commands below to explore your process &lt;/li&gt;&lt;/ul&gt;
&lt;h3&gt;Commands&lt;/h3&gt;
&lt;table&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;th colspan="2"&gt;
&lt;p&gt;Session Management&lt;/p&gt;
&lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top"&gt;&lt;a href="/wikipage?title=New-DbgSession&amp;referringTitle=Documentation"&gt;New-DbgSession&lt;/a&gt;&lt;/td&gt;
&lt;td valign="top"&gt;Establishes a PowerDbg session with the debugger&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top"&gt;&lt;a href="/wikipage?title=Exit-DbgSession&amp;referringTitle=Documentation"&gt;Exit-DbgSession&lt;/a&gt;&lt;/td&gt;
&lt;td valign="top"&gt;Terminates the current PowerDbg session&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top"&gt;&lt;a href="/wikipage?title=Load-DbgExtension&amp;referringTitle=Documentation"&gt;Load-DbgExtension&lt;/a&gt;&lt;/td&gt;
&lt;td valign="top"&gt;Loads a debugger extension into to the active session&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top"&gt;&lt;a href="/wikipage?title=Invoke-DbgCommand&amp;referringTitle=Documentation"&gt;Invoke-DbgCommand&lt;/a&gt;&lt;/td&gt;
&lt;td valign="top"&gt;Executes an arbitrary command against the debugger&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;th colspan="2"&gt;
&lt;p&gt;Exploration&lt;/p&gt;
&lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="/wikipage?title=Get-DbgArray"&gt;Get-DbgArray&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Expands the contents of a managed array&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="/wikipage?title=Get-DbgClrHeap"&gt;Get-DbgClrHeap&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Locate objects on the managed heap by type or MT&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="/wikipage?title=Get-DbgDictionaryContents"&gt;Get-DbgDictionaryContents&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Enumerate Dictionary&amp;lt;T,T&amp;gt; collections&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="/wikipage?title=Get-DbgListContents"&gt;Get-DbgListContents&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Enumerate List&amp;lt;T&amp;gt; collections&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="/wikipage?title=Get-DbgObject"&gt;Get-DbgObject&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Views the contents of a reference-type object&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="/wikipage?title=Get-DbgValueClass"&gt;Get-DbgValueClass&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Views the contents of a value-type object&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;th colspan="2"&gt;
&lt;p&gt;Process State&lt;/p&gt;
&lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="/wikipage?title=Get-DbgClrThreads"&gt;Get-DbgClrThreads&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Lists managed threads&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="/wikipage?title=Get-DbgComState&amp;referringTitle=Documentation"&gt;Get-DbgComState&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;View the COM apartment state associated with each thread&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="/wikipage?title=Get-DbgModules"&gt;Get-DbgModules&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Lists modules loaded into the process&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="/wikipage?title=Get-DbgRunaway&amp;referringTitle=Documentation"&gt;Get-DbgRunaway&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;View the kernel and user time associated with each thread&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;th colspan="2"&gt;
&lt;p&gt;Analysis&lt;/p&gt;
&lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="/wikipage?title=Analyze-PowerDbgThreads&amp;referringTitle=Documentation"&gt;Analyze-PowerDbgThreads&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&amp;nbsp;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;th colspan="2"&gt;
&lt;p&gt;Misc&lt;/p&gt;
&lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="/wikipage?title=Start-DebuggerOnly&amp;referringTitle=Documentation"&gt;Start-DebuggerOnly&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Launches a debugger without creating a PowerDbg session&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="/wikipage?title=Get-DbgHangDump&amp;referringTitle=Documentation"&gt;Get-DbgHangDump&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Takes an immediate full minidump of a given process&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h3&gt;Previous Releases&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="/wikipage?title=Version%205&amp;referringTitle=Documentation"&gt;Version 5&lt;/a&gt;
&lt;/li&gt;&lt;/ul&gt;
&lt;/div&gt;&lt;div class="ClearBoth"&gt;&lt;/div&gt;</description><author>piers7</author><pubDate>Mon, 15 Nov 2010 15:29:14 GMT</pubDate><guid isPermaLink="false">Updated Wiki: Documentation 20101115032914P</guid></item><item><title>Updated Wiki: Documentation</title><link>http://powerdbg.codeplex.com/documentation?version=6</link><description>&lt;div class="wikidoc"&gt;
&lt;h3&gt;Current Release&lt;/h3&gt;
&lt;p&gt;The current release of PowerDbg is &lt;a href="/wikipage?title=Version%206&amp;referringTitle=Documentation"&gt;
Version 6&lt;/a&gt;. &lt;br&gt;
This is currently in alpha status whilst we attempt to determine what bugs / missing features need to be fixed before a release is worth doing.&lt;/p&gt;
&lt;h3&gt;Getting Started Guides&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="/releases/view/54096"&gt;Download&lt;/a&gt; and &lt;a href="/wikipage?title=Setup&amp;version=1"&gt;
Setup&lt;/a&gt; PowerDbg &lt;/li&gt;&lt;li&gt;Establishing your first PowerDbg ‘session’ &lt;/li&gt;&lt;/ul&gt;
&lt;h3&gt;Commands&lt;/h3&gt;
&lt;table&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;th colspan="2"&gt;
&lt;p align="left"&gt;Session Management&lt;/p&gt;
&lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top"&gt;&lt;a href="/wikipage?title=New-DbgSession&amp;amp;referringTitle=Documentation"&gt;New-DbgSession&lt;/a&gt;&lt;/td&gt;
&lt;td valign="top"&gt;Establishes a PowerDbg session with the debugger&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top"&gt;&lt;a href="/wikipage?title=Exit-DbgSession&amp;amp;referringTitle=Documentation"&gt;Exit-DbgSession&lt;/a&gt;&lt;/td&gt;
&lt;td valign="top"&gt;Terminates the current PowerDbg session&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top"&gt;&lt;a href="/wikipage?title=Load-DbgExtension&amp;amp;referringTitle=Documentation"&gt;Load-DbgExtension&lt;/a&gt;
&lt;/td&gt;
&lt;td valign="top"&gt;Loads a debugger extension into to the active session&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top"&gt;&lt;a href="/wikipage?title=Invoke-DbgCommand&amp;amp;referringTitle=Documentation"&gt;Invoke-DbgCommand&lt;/a&gt;&lt;/td&gt;
&lt;td valign="top"&gt;Executes an arbitrary command against the debugger&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;th colspan="2"&gt;
&lt;p align="left"&gt;Exploration&lt;/p&gt;
&lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="/wikipage?title=Get-DbgArray"&gt;Get-DbgArray&lt;/a&gt; &lt;/td&gt;
&lt;td&gt;Expands the contents of a managed array&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="/wikipage?title=Get-DbgClrHeap"&gt;Get-DbgClrHeap&lt;/a&gt; &lt;/td&gt;
&lt;td&gt;Locate objects on the managed heap by type or MT&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="/wikipage?title=Get-DbgDictionaryContents"&gt;Get-DbgDictionaryContents&lt;/a&gt;
&lt;/td&gt;
&lt;td&gt;Enumerate Dictionary&amp;lt;T,T&amp;gt; collections&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="/wikipage?title=Get-DbgListContents"&gt;Get-DbgListContents&lt;/a&gt; &lt;/td&gt;
&lt;td&gt;Enumerate List&amp;lt;T&amp;gt; collections&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="/wikipage?title=Get-DbgObject"&gt;Get-DbgObject&lt;/a&gt; &lt;/td&gt;
&lt;td&gt;Views the contents of a reference-type object&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="/wikipage?title=Get-DbgValueClass"&gt;Get-DbgValueClass&lt;/a&gt; &lt;/td&gt;
&lt;td&gt;Views the contents of a value-type object&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;th colspan="2"&gt;
&lt;p align="left"&gt;Process State&lt;/p&gt;
&lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="/wikipage?title=Get-DbgClrThreads"&gt;Get-DbgClrThreads&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Lists managed threads&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="/wikipage?title=Get-DbgComState&amp;amp;referringTitle=Documentation"&gt;Get-DbgComState&lt;/a&gt;
&lt;/td&gt;
&lt;td&gt;View the COM apartment state associated with each thread&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="/wikipage?title=Get-DbgModules"&gt;Get-DbgModules&lt;/a&gt; &lt;/td&gt;
&lt;td&gt;Lists modules loaded into the process&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="/wikipage?title=Get-DbgRunaway&amp;amp;referringTitle=Documentation"&gt;Get-DbgRunaway&lt;/a&gt;
&lt;/td&gt;
&lt;td&gt;View the kernel and user time associated with each thread&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;th colspan="2"&gt;
&lt;p align="left"&gt;Analysis&lt;/p&gt;
&lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="/wikipage?title=Analyze-PowerDbgThreads&amp;amp;referringTitle=Documentation"&gt;Analyze-PowerDbgThreads&lt;/a&gt;
&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;th colspan="2"&gt;
&lt;p align="left"&gt;Misc&lt;/p&gt;
&lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="/wikipage?title=Start-DebuggerOnly&amp;amp;referringTitle=Documentation"&gt;Start-DebuggerOnly&lt;/a&gt;
&lt;/td&gt;
&lt;td&gt;Launches a debugger without creating a PowerDbg session&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="/wikipage?title=Get-DbgHangDump&amp;amp;referringTitle=Documentation"&gt;Get-DbgHangDump&lt;/a&gt;
&lt;/td&gt;
&lt;td&gt;Takes an immediate full minidump of a given process&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h3&gt;Previous Releases&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="/wikipage?title=Version%205&amp;referringTitle=Documentation"&gt;Version 5&lt;/a&gt;
&lt;/li&gt;&lt;/ul&gt;
&lt;/div&gt;&lt;div class="ClearBoth"&gt;&lt;/div&gt;</description><author>piers7</author><pubDate>Mon, 15 Nov 2010 15:26:09 GMT</pubDate><guid isPermaLink="false">Updated Wiki: Documentation 20101115032609P</guid></item><item><title>Updated Wiki: Home</title><link>http://powerdbg.codeplex.com/wikipage?version=29</link><description>&lt;div class="wikidoc"&gt;
&lt;p&gt;&lt;strong&gt;PowerDbg&lt;/strong&gt; is a &lt;strong&gt;PowerShell&lt;/strong&gt; library that enables you to easily create PowerShell scripts to automate a WinDbg / CDB debugging session. You can use PowerDbg for
&lt;strong&gt;Kernel Mode&lt;/strong&gt; or &lt;strong&gt;User Mode&lt;/strong&gt;, &lt;strong&gt;Post-Mortem debugging&lt;/strong&gt; or
&lt;strong&gt;Live Debugging&lt;/strong&gt; and for &lt;strong&gt;native&lt;/strong&gt; or &lt;strong&gt;managed code&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;PowerShell has several advantages over the WinDbg Scripting Language. A few of them are:
&lt;br&gt;
&lt;br&gt;
- Easier to create scripts &lt;br&gt;
- Leverage the .NET Framework &lt;br&gt;
- Debugging and tracing features &lt;br&gt;
- Code reuse through functions and cmdlets &lt;br&gt;
- Easier maintenance &lt;br&gt;
- Easier to build large scripts &lt;br&gt;
- Easier to format and display the important information&lt;/p&gt;
&lt;p&gt;Whether you’re an old hand frustrated with WinDbg scripting, or you’re having your ‘first memory dump’ freak-out, PowerDbg is for you. And hopefully for everyone in the middle too.&lt;/p&gt;
&lt;h2&gt;News&lt;/h2&gt;
&lt;p&gt;&lt;a href="http://powerdbg.codeplex.com/wikipage?title=Version%206"&gt;Version 6&lt;/a&gt; has been released as alpha. This is a really exciting release that makes it even easier to write scripts or otherwise just hack around against the debugger, and includes the
 PowerDbgConsole, a bootstrapper designed to make setting up an interactive PowerDbg debugging session a one-liner. It’s faster, easier to use and has full 64 bit support.
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://powerdbg.codeplex.com/releases/view/54096"&gt;Download it now&lt;/a&gt;
&lt;/li&gt;&lt;li&gt;&lt;a href="http://powerdbg.codeplex.com/documentation"&gt;Getting Started&lt;/a&gt; &lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;Version 6 &lt;em&gt;should &lt;/em&gt;run all Version 5 scripts without too much (any?) modifications, but that’s one of the things we’ll be testing during the alpha period. If you find any problems,
&lt;a href="http://powerdbg.codeplex.com/workitem/list/basic"&gt;shout&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://powerdbg.codeplex.com/releases/view/16314"&gt;Version 5&lt;/a&gt; is still available.&lt;/p&gt;
&lt;/div&gt;&lt;div class="ClearBoth"&gt;&lt;/div&gt;</description><author>piers7</author><pubDate>Mon, 15 Nov 2010 15:03:40 GMT</pubDate><guid isPermaLink="false">Updated Wiki: Home 20101115030340P</guid></item><item><title>Updated Wiki: Home</title><link>http://powerdbg.codeplex.com/wikipage?version=28</link><description>&lt;div class="wikidoc"&gt;
&lt;p&gt;&lt;strong&gt;PowerDbg&lt;/strong&gt; is a &lt;strong&gt;PowerShell&lt;/strong&gt; library that enables you to easily create PowerShell scripts to automate a WinDbg / CDB debugging session. You can use PowerDbg for
&lt;strong&gt;Kernel Mode&lt;/strong&gt; or &lt;strong&gt;User Mode&lt;/strong&gt;, &lt;strong&gt;Post-Mortem debugging&lt;/strong&gt; or
&lt;strong&gt;Live Debugging&lt;/strong&gt; and for &lt;strong&gt;native&lt;/strong&gt; or &lt;strong&gt;managed code&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;PowerShell has several advantages over the WinDbg Scripting Language. A few of them are:
&lt;br&gt;
&lt;br&gt;
- Easier to create scripts &lt;br&gt;
- Leverage the .NET Framework &lt;br&gt;
- Debugging and tracing features &lt;br&gt;
- Code reuse through functions and cmdlets &lt;br&gt;
- Easier maintenance &lt;br&gt;
- Easier to build large scripts &lt;br&gt;
- Easier to format and display the important information&lt;/p&gt;
&lt;p&gt;Whether you’re an old hand frustrated with WinDbg scripting, or you’re having your ‘first memory dump’ freak-out, PowerDbg is for you. And hopefully for everyone in the middle too.&lt;/p&gt;
&lt;h2&gt;News&lt;/h2&gt;
&lt;p&gt;&lt;a href="http://powerdbg.codeplex.com/wikipage?title=Version%206"&gt;Version 6&lt;/a&gt; has been released as alpha. This is a really exciting release that makes it even easier to write scripts or otherwise just hack around against the debugger, and includes the
 PowerDbgConsole, a bootstrapper designed to make setting up an interactive PowerDbg debugging session a one-liner. Its faster, easier to use and has full 64 bit support.
&lt;a href="http://powerdbg.codeplex.com/releases/view/54096"&gt;Download it now&lt;/a&gt;. &lt;br&gt;
&lt;br&gt;
Version 6 &lt;em&gt;should &lt;/em&gt;run all Version 5 scripts without too much (any?) modifications, but that’s one of the things we’ll be testing during the alpha period. If you find any problems,
&lt;a href="http://powerdbg.codeplex.com/workitem/list/basic"&gt;shout&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://powerdbg.codeplex.com/releases/view/16314"&gt;Version 5&lt;/a&gt; is still available.&lt;/p&gt;
&lt;/div&gt;&lt;div class="ClearBoth"&gt;&lt;/div&gt;</description><author>piers7</author><pubDate>Mon, 15 Nov 2010 15:00:43 GMT</pubDate><guid isPermaLink="false">Updated Wiki: Home 20101115030043P</guid></item><item><title>Updated Wiki: Version 6</title><link>http://powerdbg.codeplex.com/wikipage?title=Version 6&amp;version=20</link><description>&lt;div class="wikidoc"&gt;
&lt;h1&gt;PowerDbg Version 6&lt;/h1&gt;
With this release we're really focusing on making PowerDbg (and by extension WinDbg) as easy to use as possible, whilst at the same time enabling a much richer debugging experience that really leverages the power of PowerShell.
&lt;br&gt;
&lt;h2&gt;Status&lt;/h2&gt;
Alpha &lt;br&gt;
Grab the 6.10.10.10 release from Downloads, or grab a 'bleeding edge' build from source control under .\dev\out\Modules
&lt;br&gt;
&lt;h2&gt;New Features&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Wherever possible we now returned structured (PSObject) data from commands, that can be filtered, pilelined etc... The CSV file is depricated. The raw output from a command can always be retrieved with the -raw switch.
&lt;/li&gt;&lt;li&gt;Cmdlet aliases to reflect the WinDbg experience as closely as possible &lt;/li&gt;&lt;li&gt;Both 32 and 64 bit support for implemented cmdlets (nb: WOW64 not supported this release)
&lt;/li&gt;&lt;li&gt;Bundled sample debugging scenarios, that can be built and used for training purposes (these actually form the basis of our integration tests)
&lt;/li&gt;&lt;li&gt;PowerDbgConsole - provides a really easy way to get a PowerDbg session up and running against a process or an existing memory dump. Optional whether WinDbg UI is shown (remote mode) or whether whole session runs against (hidden) CDB process.
&lt;/li&gt;&lt;li&gt;(TODO) Caching when debugging against a dump, so re-executing the same command is much faster.
&lt;/li&gt;&lt;/ul&gt;
&lt;br&gt;
We've also now got a 'build' process that makes it easier for us to develop new commands, but that's more a housekeeping thing.
&lt;br&gt;
&lt;h2&gt;Backwards Compatibility&lt;/h2&gt;
It's the &lt;i&gt;intent&lt;/i&gt; that all existing v5 scripts should still run as-is. This will need testing however...
&lt;br&gt;
&lt;h2&gt;CmdLet Naming&lt;/h2&gt;
After a bit of tooing and fro-ing over this we are going to genuinely PowerShell-ize the cmdlet names (so !dumpobject =
&lt;b&gt;Get-DbgObject&lt;/b&gt;, !threads = &lt;b&gt;Get-DbgClrThreads&lt;/b&gt;). As much as anything there is considerable advantage in being able to type 'help *Dgb' and see all the cmdlets that we've exposed.
&lt;br&gt;
The cmdlet names will still reflect (as much as possible) the underlying SOS / PSSCOR2 command names, in many cases just with the 'dump' prefix stripped off.
&lt;br&gt;
&lt;br&gt;
&lt;i&gt;Internal&lt;/i&gt; functions (not exposed on the module interface) will tend to reflect more the name of the WinDBG command / extension that they are operating with. For example
&lt;b&gt;Get-DbgObject&lt;/b&gt; uses a function called &lt;b&gt;Parse-DumpObject&lt;/b&gt;, &lt;b&gt;Get-DbgArray&lt;/b&gt; uses
&lt;b&gt;Parse-DumpArray&lt;/b&gt; &lt;br&gt;
&lt;h2&gt;Commands&lt;/h2&gt;
(get-command -module WinDbg) &lt;br&gt;
&lt;br&gt;
&lt;i&gt;Anything without a hyperlink is &lt;b&gt;proposed&lt;/b&gt; and has not been implemented. This list may change, and reflects us doing our laundry in public.&lt;/i&gt;
&lt;br&gt;
&lt;h3&gt;Basic commands&lt;/h3&gt;
These map 1:1 with an underlying WinDbg / SOS command, and will typically have an alias that matches the original WinDbg command.
&lt;br&gt;
&lt;br&gt;
&lt;table&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;th&gt;CmdLet &lt;/th&gt;
&lt;th&gt;SOS command &lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="/powerdbg/wikipage?title=Get-DbgArray&amp;referringTitle=Version%206"&gt;Get-DbgArray&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;!dumparray &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="/powerdbg/wikipage?title=Get-DbgClrHeap&amp;referringTitle=Version%206"&gt;Get-DbgClrHeap&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;!dumpheap &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="/powerdbg/wikipage?title=Get-DbgClrThreads&amp;referringTitle=Version%206"&gt;Get-DbgClrThreads&lt;/a&gt;
&lt;/td&gt;
&lt;td&gt;!clrthreads &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="/powerdbg/wikipage?title=Get-DbgComState&amp;referringTitle=Version%206"&gt;Get-DbgComState&lt;/a&gt;
&lt;/td&gt;
&lt;td&gt;!comstate &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="/powerdbg/wikipage?title=Get-DbgModules&amp;referringTitle=Version%206"&gt;Get-DbgModules&lt;/a&gt;
&lt;/td&gt;
&lt;td&gt;lm k &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="/powerdbg/wikipage?title=Get-DbgObject&amp;referringTitle=Version%206"&gt;Get-DbgObject&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;!dumpobject &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="/powerdbg/wikipage?title=Get-DbgValueClass&amp;referringTitle=Version%206"&gt;Get-DbgValueClass&lt;/a&gt;
&lt;/td&gt;
&lt;td&gt;!dumpvc &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="/powerdbg/wikipage?title=Get-DbgRunaway&amp;referringTitle=Version%206"&gt;Get-DbgRunaway&lt;/a&gt;
&lt;/td&gt;
&lt;td&gt;!runaway &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Get-DbgStackObjects &lt;/td&gt;
&lt;td&gt;!dumpstackobjects &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Get-DbgSyncBlocks &lt;/td&gt;
&lt;td&gt;!synkblk &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Get-DbgMethodDesc &lt;/td&gt;
&lt;td&gt;!dumpmd &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Get-DbgMethodTable &lt;/td&gt;
&lt;td&gt;!dumpmt &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Get-DbgException &lt;/td&gt;
&lt;td&gt;!printexception &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Get-DbgObjectSize &lt;/td&gt;
&lt;td&gt;!objsize &lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;br&gt;
&lt;h3&gt;Composite Commands&lt;/h3&gt;
These combine multiple debugger commands to save time and facilitate analysis. &lt;br&gt;
&lt;br&gt;
&lt;table&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;th&gt;CmdLet &lt;/th&gt;
&lt;th&gt;Description &lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="/powerdbg/wikipage?title=Get-DbgDictionaryContents&amp;referringTitle=Version%206"&gt;Get-DbgDictionaryContents&lt;/a&gt; was
&lt;a href="/powerdbg/wikipage?title=Dump-Dictionary&amp;referringTitle=Version%206"&gt;Dump-Dictionary&lt;/a&gt;
&lt;/td&gt;
&lt;td&gt;Gets the objects contained in a managed dictionary, by traversing the backing array
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="/powerdbg/wikipage?title=Get-DbgListContents&amp;referringTitle=Version%206"&gt;Get-DbgListContents&lt;/a&gt;
&lt;/td&gt;
&lt;td&gt;Gets the objects contained in a managed List&amp;lt;T&amp;gt;, by traversing the backing array
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;* Get-DbgThreadAnalysis &lt;/td&gt;
&lt;td&gt;Provides more detail on thread activity, including CPU time, locks held, COM apartment model and current state
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;&lt;div class="ClearBoth"&gt;&lt;/div&gt;</description><author>piers7</author><pubDate>Mon, 15 Nov 2010 14:59:18 GMT</pubDate><guid isPermaLink="false">Updated Wiki: Version 6 20101115025918P</guid></item><item><title>Updated Wiki: Get-DbgDictionaryContents</title><link>http://powerdbg.codeplex.com/wikipage?title=Get-DbgDictionaryContents&amp;version=1</link><description>&lt;div class="wikidoc"&gt;&lt;h1&gt;Get-DbgDictionaryContents&lt;/h1&gt;
Dumps the contents of a dictionary as a key,value list of addresses. &lt;br /&gt;&lt;br /&gt;This is a &amp;#39;higher level&amp;#39; function that consists of extracting the address for the dictionary&amp;#39;s backing array, traversing the array contents to extract the individual dictionary entries and extracting the key and value addresses, all of which would otherwise be done &amp;#39;by hand&amp;#39;.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;
PowerDbg &amp;gt; $types = Get-DbgClrHeap -type Dictionary
PowerDbg &amp;gt; $values = ($types[0].instances | % { Get-DbgDictionaryContents $_.Address })
PowerDbg &amp;gt; $values

key                                                         value
---                                                         -----
000000000275d7f8                                            000000000275e948
000000000275d820                                            000000000275e968


PowerDbg &amp;gt; $values | % { $_.key } | Get-DbgObject

__Fields        : {System.Object, System.Object, System.Object, System.Object...}
__Name          : System.String
__MethodTable   : 000007fee876ec90
__EEClass       : 000007fee837b038
__Size          : 36(0x24) bytes
__String        : Test1
m_arrayLength   : 6
m_stringLength  : 5
m_firstChar     : 54
Empty           : static
WhitespaceChars : static

__Fields        : {System.Object, System.Object, System.Object, System.Object...}
__Name          : System.String
__MethodTable   : 000007fee876ec90
__EEClass       : 000007fee837b038
__Size          : 36(0x24) bytes
__String        : Test2
m_arrayLength   : 6
m_stringLength  : 5
m_firstChar     : 54
Empty           : static
WhitespaceChars : static

PowerDbg &amp;gt; $values | % { $_.key } | Get-DbgObject | % { $_.__String }
Test1
Test2
&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;In a future release we will probably auto-expand the key and value addresses, and possibly even detect string keys and expand them all the way to the string literal.&lt;/div&gt;&lt;div class="ClearBoth"&gt;&lt;/div&gt;</description><author>piers7</author><pubDate>Mon, 15 Nov 2010 14:58:37 GMT</pubDate><guid isPermaLink="false">Updated Wiki: Get-DbgDictionaryContents 20101115025837P</guid></item><item><title>Updated Wiki: Get-DbgObject</title><link>http://powerdbg.codeplex.com/wikipage?title=Get-DbgObject&amp;version=2</link><description>&lt;div class="wikidoc"&gt;&lt;h1&gt;Get-DbgObject&lt;/h1&gt;
Equivilent to !dumpobject&lt;br /&gt;&lt;br /&gt;This cmdlet returns the information about a reference-type object at a given address as a synthetic powershell object that mimics the original object&amp;#39;s structure:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;
PowerDbg &amp;gt; Get-DbgObject 000000000275e948

__Fields                         : {System.Object, System.Object, System.Object}
__MethodTable                    : 000007ff000549e8
__EEClass                        : 000007ff00193610
__Size                           : 32(0x20) bytes
_privateStringField              : 000000000275d7f8
Enabled                          : 1
&amp;lt;IntAutoProperty&amp;gt;k__BackingField : 1
&lt;/pre&gt;&lt;br /&gt;For comparison, the original object structure was as follows:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;
        private string _privateStringField;
        public int IntAutoProperty { get; set; }
        public bool Enabled;    // Public field
&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;You can see that the fields in the original object have been converted into properties on the returned object (the strange naming for IntAutoProperty being the result of the C# compiler&amp;#39;s naming convention for auto-generated property backing fields). &lt;br /&gt;&lt;br /&gt;Instance-level metadata is retained in the double-underscore properties you see above (&lt;i&gt;&lt;/i&gt;MethodTable, &lt;i&gt;&lt;/i&gt;EEClass etc...), and the per-field metadata that you see in !dumpobject output can be accessed via the &lt;i&gt;&lt;/i&gt;Fields collection. &lt;br /&gt;&lt;br /&gt;&lt;pre&gt;
PowerDbg &amp;gt; $obj.__Fields | format-table

MT        Field     Offset    Type      VT        Attr      Value     Name
--        -----     ------    ----      --        ----      -----     ----
000007... 4000001   8         System... 0         instance  000000... _priva...
000007... 4000002   14        System... 1         instance  1         Enabled
000007... 4000003   10        System... 1         instance  1         &amp;lt;IntAu...
&lt;/pre&gt;&lt;br /&gt;The cmdlet takes either the object address (as a parameter) or can accept &lt;b&gt;pipeline input&lt;/b&gt; of either addresses or objects with an &amp;#39;Address&amp;#39; property. This makes it easy to pipe the output from other commands to dump-object, for example thet output from dump-heap:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;
PowerDbg &amp;gt; $type = Get-DbgClrHeap -type ManagedScenarios.ADataStructure | ? { $_.ClassName -eq &amp;#39;ManagedScenarios.ADataStructure&amp;#39; }
PowerDbg &amp;gt; $type.Instances | format-table -AutoSize

Address          MT               Size ClassName
-------          --               ---- ---------
000000000275e948 000007ff000549e8 32   ManagedScenarios.ADataStructure
000000000275e968 000007ff000549e8 32   ManagedScenarios.ADataStructure

PowerDbg &amp;gt; $type.Instances | Get-DbgObject | format-table

__Fields     __Name       __MethodTabl __EEClass    __Size      _privateStr Enabled     &amp;lt;IntAutoPro
                          e                                     ingField                perty&amp;gt;k__Ba
                                                                                        ckingField
--------     ------       ------------ ---------    ------      ----------- -------     -----------
{System.O... ManagedSc... 000007ff0... 000007ff0... 32(0x20)... 00000000... 1           1
{System.O... ManagedSc... 000007ff0... 000007ff0... 32(0x20)... 00000000... 0           2
&lt;/pre&gt;&lt;br /&gt;Since the output from Get-DbgObject is, itself, a pipeline object, you can filter on it using normal powershell operations. This makes ripping through large arrays, dictionaries etc... looking for specific things much easier. A trivial example from the above - filtering on the Enabled property of the original object:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;
PowerDbg &amp;gt; $type.Instances | Get-DbgObject | ? { $_.Enabled -eq 1 }

__Fields                         : {System.Object, System.Object, System.Object}
__Name                           : ManagedScenarios.ADataStructure
__MethodTable                    : 000007ff000549e8
__EEClass                        : 000007ff00193610
__Size                           : 32(0x20) bytes
_privateStringField              : 000000000275d7f8
Enabled                          : 1
&amp;lt;IntAutoProperty&amp;gt;k__BackingField : 1
&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="ClearBoth"&gt;&lt;/div&gt;</description><author>piers7</author><pubDate>Mon, 15 Nov 2010 14:56:33 GMT</pubDate><guid isPermaLink="false">Updated Wiki: Get-DbgObject 20101115025633P</guid></item><item><title>Updated Wiki: Get-DbgObject</title><link>http://powerdbg.codeplex.com/wikipage?title=Get-DbgObject&amp;version=1</link><description>&lt;div class="wikidoc"&gt;&lt;h1&gt;Get-DbgObject&lt;/h1&gt;
Equivilent to !dumpobject&lt;br /&gt;&lt;br /&gt;This cmdlet returns the information about a class-type object at a given address as a synthetic powershell object that mimics the original object&amp;#39;s structure:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;
PowerDbg &amp;gt; Get-DbgObject 000000000275e948

__Fields                         : {System.Object, System.Object, System.Object}
__MethodTable                    : 000007ff000549e8
__EEClass                        : 000007ff00193610
__Size                           : 32(0x20) bytes
_privateStringField              : 000000000275d7f8
Enabled                          : 1
&amp;lt;IntAutoProperty&amp;gt;k__BackingField : 1
&lt;/pre&gt;&lt;br /&gt;For comparison, the original object structure was as follows:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;
        private string _privateStringField;
        public int IntAutoProperty { get; set; }
        public bool Enabled;    // Public field
&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;You can see that the fields in the original object have been converted into properties on the returned object (the strange naming for IntAutoProperty being the result of the C# compiler&amp;#39;s naming convention for auto-generated property backing fields). &lt;br /&gt;&lt;br /&gt;Instance-level metadata is retained in the double-underscore properties you see above (&lt;i&gt;&lt;/i&gt;MethodTable, &lt;i&gt;&lt;/i&gt;EEClass etc...), and the per-field metadata that you see in !dumpobject output can be accessed via the &lt;i&gt;&lt;/i&gt;Fields collection. &lt;br /&gt;&lt;br /&gt;&lt;pre&gt;
PowerDbg &amp;gt; $obj.__Fields | format-table

MT        Field     Offset    Type      VT        Attr      Value     Name
--        -----     ------    ----      --        ----      -----     ----
000007... 4000001   8         System... 0         instance  000000... _priva...
000007... 4000002   14        System... 1         instance  1         Enabled
000007... 4000003   10        System... 1         instance  1         &amp;lt;IntAu...
&lt;/pre&gt;&lt;br /&gt;The cmdlet takes either the object address (as a parameter) or can accept &lt;b&gt;pipeline input&lt;/b&gt; of either addresses or objects with an &amp;#39;Address&amp;#39; property. This makes it easy to pipe the output from other commands to dump-object, for example thet output from dump-heap:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;
PowerDbg &amp;gt; $type = Get-DbgClrHeap -type ManagedScenarios.ADataStructure | ? { $_.ClassName -eq &amp;#39;ManagedScenarios.ADataStructure&amp;#39; }
PowerDbg &amp;gt; $type.Instances | format-table -AutoSize

Address          MT               Size ClassName
-------          --               ---- ---------
000000000275e948 000007ff000549e8 32   ManagedScenarios.ADataStructure
000000000275e968 000007ff000549e8 32   ManagedScenarios.ADataStructure

PowerDbg &amp;gt; $type.Instances | Get-DbgObject | format-table

__Fields     __Name       __MethodTabl __EEClass    __Size      _privateStr Enabled     &amp;lt;IntAutoPro
                          e                                     ingField                perty&amp;gt;k__Ba
                                                                                        ckingField
--------     ------       ------------ ---------    ------      ----------- -------     -----------
{System.O... ManagedSc... 000007ff0... 000007ff0... 32(0x20)... 00000000... 1           1
{System.O... ManagedSc... 000007ff0... 000007ff0... 32(0x20)... 00000000... 0           2
&lt;/pre&gt;&lt;br /&gt;Since the output from Get-DbgObject is, itself, a pipeline object, you can filter on it using normal powershell operations. This makes ripping through large arrays, dictionaries etc... looking for specific things much easier. A trivial example from the above - filtering on the Enabled property of the original object:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;
PowerDbg &amp;gt; $type.Instances | Get-DbgObject | ? { $_.Enabled -eq 1 }

__Fields                         : {System.Object, System.Object, System.Object}
__Name                           : ManagedScenarios.ADataStructure
__MethodTable                    : 000007ff000549e8
__EEClass                        : 000007ff00193610
__Size                           : 32(0x20) bytes
_privateStringField              : 000000000275d7f8
Enabled                          : 1
&amp;lt;IntAutoProperty&amp;gt;k__BackingField : 1
&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="ClearBoth"&gt;&lt;/div&gt;</description><author>piers7</author><pubDate>Mon, 15 Nov 2010 14:55:46 GMT</pubDate><guid isPermaLink="false">Updated Wiki: Get-DbgObject 20101115025546P</guid></item><item><title>Updated Wiki: Get-DbgClrThreads</title><link>http://powerdbg.codeplex.com/wikipage?title=Get-DbgClrThreads&amp;version=1</link><description>&lt;div class="wikidoc"&gt;&lt;h1&gt;Get-DbgClrThreads&lt;/h1&gt;
Equivilent to !threads&lt;br /&gt;&lt;br /&gt;Provides a list of the managed threads in the process, as PSObjects. The &lt;b&gt;-live&lt;/b&gt; and &lt;b&gt;-special&lt;/b&gt; parameters of the underlying SOS command are supported.&lt;br /&gt;
&lt;h2&gt;Example: Viewing the Exception For A Thread&lt;/h2&gt;One of the things that !threads reports is the address of the exception (if any) currently on the stack for each thread. In the case of a &lt;i&gt;crash&lt;/i&gt; mode dump for an unhandled exception, that exception is the one that&amp;#39;s just about to kill your process. So seeing what the exception actually is is pretty useful.&lt;br /&gt;&lt;br /&gt;&lt;i&gt;(In this example the threads are rendered using Format-List (the default) otherwise you don&amp;#39;t see the column with the ExceptionAddress in. Piping the output to Out-GridView is what I&amp;#39;d normally recommend)&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;
PowerDbg &amp;gt; Get-DbgClrThreads

DbgID            : 0
ID               : 1
OSID             : 15cc
ThreadOBJ        : 000000000042aff0
State            : a02
GC               : Enabled
GC Alloc Context : 000000000275fea0:000000000275ffd0
Domain           : 00000000003cf120
Lock Count       :
APT              : MTA
Exception        : System.InvalidOperationException (000000000275fd58)
ExceptionAddress : 000000000275fd58

DbgID            : 2
ID               : 2
OSID             : 630
ThreadOBJ        : 0000000000554340
State            : b22
GC               : Enabled
GC Alloc Context : 0000000000000000:0000000000000000
Domain           : 00000000003cf120
Lock Count       :
APT              : MTA
Exception        : (Finalizer)
ExceptionAddress : Finalizer
&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;The first has an exception, so we want to see what the exception message is:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;
PowerDbg &amp;gt; $ex = (Get-DbgClrThreads)[0].ExceptionAddress | Get-DbgObject
PowerDbg &amp;gt; $ex._message | Get-DbgObject

__Fields        : {System.Object, System.Object, System.Object, System.Object...}
__Name          : System.String
__MethodTable   : 000007fee876ec90
__EEClass       : 000007fee837b038
__Size          : 162(0xa2) bytes
__String        : If you can read this, you&amp;#39;re too close! 21:02:49
m_arrayLength   : 69
m_stringLength  : 48
m_firstChar     : 49
Empty           : static
WhitespaceChars : static
&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Ah. It all makes sense now.&lt;/div&gt;&lt;div class="ClearBoth"&gt;&lt;/div&gt;</description><author>piers7</author><pubDate>Mon, 15 Nov 2010 14:53:54 GMT</pubDate><guid isPermaLink="false">Updated Wiki: Get-DbgClrThreads 20101115025354P</guid></item><item><title>Updated Wiki: Get-DbgClrHeap</title><link>http://powerdbg.codeplex.com/wikipage?title=Get-DbgClrHeap&amp;version=1</link><description>&lt;div class="wikidoc"&gt;&lt;h1&gt;Get-DbgClrHeap&lt;/h1&gt;
Equivilent to !dumpheap&lt;br /&gt;&lt;br /&gt;Provides information on the contents of the managed heap. Each type on the heap (or matching type if a -type filter specified) is returned as an object with properties for the MethodTable (MT), Count, ClassName etc...&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;
PowerDbg &amp;gt; $types = Get-DbgClrHeap -type Dictionary
PowerDbg &amp;gt; $types

MT               Count ClassName
--               ----- ---------
000007ff00054a70 1     System.Collections.Generic.Dictionary`2[[System.Strin...
000007fee877c290 1     System.Collections.Generic.Dictionary`2[[System.Strin...
000007ff00055f60 1     System.Collections.Generic.Dictionary`2+Entry[[System...
000007fee877cb28 2     System.Collections.Generic.Dictionary`2+Entry[[System...
&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Each type returned has an &lt;b&gt;Instances&lt;/b&gt; property containing the addresses of all the instances of that type:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;
PowerDbg &amp;gt; $types[3].Instances | format-table -AutoSize

Address          MT               Size ClassName
-------          --               ---- ---------
0000000002716d98 000007fee877cb28 120  System.Collections.Generic.Dictionary`2+Entry[[System.String, mscorlib],[Syst...
0000000002732d58 000007fee877cb28 248  System.Collections.Generic.Dictionary`2+Entry[[System.String, mscorlib],[Syst...
&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;The entries within the &lt;b&gt;Instances&lt;/b&gt; list can be piped directly to &lt;a href="http://powerdbg.codeplex.com/wikipage?title=Get-DbgObject&amp;referringTitle=Get-DbgClrHeap"&gt;Get-DbgObject&lt;/a&gt;, or passed as the parameter to &lt;a href="http://powerdbg.codeplex.com/wikipage?title=Get-DbgDictionaryContents&amp;referringTitle=Get-DbgClrHeap"&gt;Get-DbgDictionaryContents&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;
PowerDbg &amp;gt; $types[3].Instances | Get-DbgObject

__Fields      : {}
__Name        : System.Collections.Generic.Dictionary`2+Entry[[System.String, mscorlib],[System.Resources.ResourceLocat
                or, mscorlib]][]
__MethodTable : 000007fee877cb28
__EEClass     : 000007fee8421650
__Size        : 120(0x78) bytes
__Array       : Rank 1, Number of elements 3, Type VALUETYPE

__Fields      : {}
__Name        : System.Collections.Generic.Dictionary`2+Entry[[System.String, mscorlib],[System.Resources.ResourceLocat
                or, mscorlib]][]
__MethodTable : 000007fee877cb28
__EEClass     : 000007fee8421650
__Size        : 248(0xf8) bytes
__Array       : Rank 1, Number of elements 7, Type VALUETYPE
&lt;/pre&gt;&lt;br /&gt;
&lt;h2&gt;Finding the Right Type&lt;/h2&gt;Since the &lt;b&gt;-type&lt;/b&gt; parameter is a simple string match, you will often get back a list of more types than you expect. In the example above, matching on Dictionary also brought back the internal helper classes that a Dictionary object uses.&lt;br /&gt;&lt;br /&gt;The simplest way of locating exactly the type you are looking for is, unfortunately, to just eyeball the items after piping to Format-List. If you need to do so programatically, crafting the right regex to further constrain the set based on the ClassName property is possible. In the following example I match a dictionary with a particular generic param, and I explicitly exclude the nested helper class:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;
PowerDbg &amp;gt; $type = $types | ? { ($_.ClassName -match &amp;#39;AData&amp;#39;) -and -not ($_.ClassName -match &amp;#39;\+Entry&amp;#39;) }
PowerDbg &amp;gt; $type

MT         : 000007ff00054a70
Count      : 1
TotalSize  : 88
Class Name : System.Collections.Generic.Dictionary`2[[System.String, mscorlib],
             [ManagedScenarios.ADataStructure, ManagedScenarios]]
Instances  : {System.Object}
ClassName  : System.Collections.Generic.Dictionary`2[[System.String, mscorlib],
             [ManagedScenarios.ADataStructure, ManagedScenarios]]
&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;In a future release we may well expose the generic parameters as properties on the type object, which would make filtering much easier.&lt;/div&gt;&lt;div class="ClearBoth"&gt;&lt;/div&gt;</description><author>piers7</author><pubDate>Mon, 15 Nov 2010 14:51:52 GMT</pubDate><guid isPermaLink="false">Updated Wiki: Get-DbgClrHeap 20101115025152P</guid></item><item><title>Updated Wiki: Home</title><link>http://powerdbg.codeplex.com/wikipage?version=27</link><description>&lt;div class="wikidoc"&gt;
&lt;p&gt;&lt;strong&gt;PowerDbg&lt;/strong&gt; is a &lt;strong&gt;PowerShell&lt;/strong&gt; library that enables you to easily create PowerShell scripts to automate a WinDbg / CDB debugging session. You can use PowerDbg for
&lt;strong&gt;Kernel Mode&lt;/strong&gt; or &lt;strong&gt;User Mode&lt;/strong&gt;, &lt;strong&gt;Post-Mortem debugging&lt;/strong&gt; or
&lt;strong&gt;Live Debugging&lt;/strong&gt; and for &lt;strong&gt;native&lt;/strong&gt; or &lt;strong&gt;managed code&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;PowerShell has several advantages over the WinDbg Scripting Language. A few of them are:
&lt;br&gt;
&lt;br&gt;
- Easier to create scripts &lt;br&gt;
- Leverage the .NET Framework &lt;br&gt;
- Debugging and tracing features &lt;br&gt;
- Code reuse through functions and cmdlets &lt;br&gt;
- Easier maintenance &lt;br&gt;
- Easier to build large scripts &lt;br&gt;
- Easier to format and display the important information&lt;/p&gt;
&lt;p&gt;Whether you&amp;rsquo;re an old hand frustrated with WinDbg scripting, or you&amp;rsquo;re having your &amp;lsquo;first memory dump&amp;rsquo; freak-out, PowerDbg is for you. And hopefully for everyone in the middle too.&lt;/p&gt;
&lt;h2&gt;News&lt;/h2&gt;
&lt;p&gt;&lt;a href="/powerdbg/wikipage?title=Version%206&amp;referringTitle=Home"&gt;Version 6&lt;/a&gt; has been released as alpha. This is a really exciting release that makes it even easier to write scripts or otherwise just hack around against the debugger, and includes the
 PowerDbgConsole, a bootstrapper designed to make setting up an interactive PowerDbg debugging session a one-liner. Its faster, easier to use and has full 64 bit support.
&lt;a href="http://powerdbg.codeplex.com/releases/view/54096"&gt;Download it now&lt;/a&gt;. &lt;br&gt;
&lt;br&gt;
Version 6 &lt;em&gt;should &lt;/em&gt;run all Version 5 scripts without too much (any?) modifications, but that&amp;rsquo;s one of the things we&amp;rsquo;ll be testing during the alpha period. If you find any problems,
&lt;a href="http://powerdbg.codeplex.com/workitem/list/basic"&gt;shout&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://powerdbg.codeplex.com/releases/view/16314"&gt;Version 5&lt;/a&gt; is still available.&lt;/p&gt;
&lt;/div&gt;&lt;div class="ClearBoth"&gt;&lt;/div&gt;</description><author>piers7</author><pubDate>Mon, 15 Nov 2010 14:48:12 GMT</pubDate><guid isPermaLink="false">Updated Wiki: Home 20101115024812P</guid></item><item><title>Updated Wiki: Documentation</title><link>http://powerdbg.codeplex.com/documentation?version=5</link><description>&lt;div class="wikidoc"&gt;
&lt;h3&gt;Current Release&lt;/h3&gt;
&lt;p&gt;The current release of PowerDbg is &lt;a href="/powerdbg/wikipage?title=Version%206&amp;referringTitle=Documentation"&gt;
Version 6&lt;/a&gt;. &lt;br&gt;
This is currently in alpha status whilst we attempt to determine what bugs / missing features need to be fixed before a release is worth doing.&lt;/p&gt;
&lt;h3&gt;Getting Started&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Download and &lt;a href="http://powerdbg.codeplex.com/wikipage?title=Setup&amp;version=1"&gt;
Setup&lt;/a&gt; PowerDbg &lt;/li&gt;&lt;li&gt;Establishing a PowerDbg ‘session’ &lt;/li&gt;&lt;/ul&gt;
&lt;h3&gt;Commands&lt;/h3&gt;
&lt;p&gt;Session Management&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;New-DbgSession &lt;/li&gt;&lt;li&gt;Exit-DbgSession &lt;/li&gt;&lt;li&gt;Load-DbgExtension &lt;/li&gt;&lt;li&gt;Invoke-DbgCommand &lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;Exploration&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://powerdbg.codeplex.com/wikipage?title=Get-DbgArray"&gt;Get-DbgArray&lt;/a&gt;
&lt;/li&gt;&lt;li&gt;&lt;a href="http://powerdbg.codeplex.com/wikipage?title=Get-DbgClrHeap"&gt;Get-DbgClrHeap&lt;/a&gt;
&lt;/li&gt;&lt;li&gt;&lt;a href="http://powerdbg.codeplex.com/wikipage?title=Get-DbgDictionaryContents"&gt;Get-DbgDictionaryContents&lt;/a&gt;
&lt;/li&gt;&lt;li&gt;&lt;a href="http://powerdbg.codeplex.com/wikipage?title=Get-DbgListContents"&gt;Get-DbgListContents&lt;/a&gt;
&lt;/li&gt;&lt;li&gt;&lt;a href="http://powerdbg.codeplex.com/wikipage?title=Get-DbgObject"&gt;Get-DbgObject&lt;/a&gt;
&lt;/li&gt;&lt;li&gt;&lt;a href="http://powerdbg.codeplex.com/wikipage?title=Get-DbgValueClass"&gt;Get-DbgValueClass&lt;/a&gt;
&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;Process State&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://powerdbg.codeplex.com/wikipage?title=Get-DbgClrThreads"&gt;Get-DbgClrThreads&lt;/a&gt;
&lt;/li&gt;&lt;li&gt;Get-DbgComState &lt;/li&gt;&lt;li&gt;&lt;a href="http://powerdbg.codeplex.com/wikipage?title=Get-DbgModules"&gt;Get-DbgModules&lt;/a&gt;
&lt;/li&gt;&lt;li&gt;Get-DbgRunaway &lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;Analysis&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Analyze-PowerDbgThreads &lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;Misc&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Start-DebuggerOnly &lt;/li&gt;&lt;li&gt;Get-DbgHangDump &lt;/li&gt;&lt;/ul&gt;
&lt;h3&gt;Previous Releases&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="/powerdbg/wikipage?title=Version%205&amp;referringTitle=Documentation"&gt;Version 5&lt;/a&gt;
&lt;/li&gt;&lt;/ul&gt;
&lt;/div&gt;&lt;div class="ClearBoth"&gt;&lt;/div&gt;</description><author>piers7</author><pubDate>Mon, 15 Nov 2010 14:46:26 GMT</pubDate><guid isPermaLink="false">Updated Wiki: Documentation 20101115024626P</guid></item></channel></rss>