<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.technet.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Exploring the PowerShell PSDiagnostics Module</title><link>http://blogs.technet.com/b/heyscriptingguy/archive/2012/11/23/exploring-the-powershell-psdiagnostics-module.aspx</link><description>Microsoft Scripting Guy, Ed Wilson, talks about exploring the Windows PowerShell PSDiagnostics module.</description><dc:language>en-US</dc:language><generator>Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><item><title>re: Exploring the PowerShell PSDiagnostics Module</title><link>http://blogs.technet.com/b/heyscriptingguy/archive/2012/11/23/exploring-the-powershell-psdiagnostics-module.aspx#3534319</link><pubDate>Fri, 23 Nov 2012 12:27:58 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3534319</guid><dc:creator>Serhad MAKBULOĞLU</dc:creator><description>&lt;p&gt;useful script, thanks.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3534319" width="1" height="1"&gt;</description></item><item><title>re: Exploring the PowerShell PSDiagnostics Module</title><link>http://blogs.technet.com/b/heyscriptingguy/archive/2012/11/23/exploring-the-powershell-psdiagnostics-module.aspx#3534283</link><pubDate>Fri, 23 Nov 2012 08:49:57 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3534283</guid><dc:creator>_Emin_</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I hope that you enjoy your trip in Europe.&lt;/p&gt;
&lt;p&gt;I enjoyed your post as I&amp;#39;ve been recently troubleshooting a PS remoting issue.&lt;/p&gt;
&lt;p&gt;But, can you pls be more specific about the version of Powershell and the plateform you&amp;#39;ve been using for these commands. I can only see in the title of the image that it&amp;#39;s powershell V3 and that some syntaxes are V3 only.&lt;/p&gt;
&lt;p&gt;The following log doesn&amp;#39;t exist on Windows 7: Microsoft-Windows-PowerShell/Admin&lt;/p&gt;
&lt;p&gt;It has been introduced on W8/WS2012 platforms. You don&amp;#39;t get it even if you install the WMF 3.0 on Windows 7.&lt;/p&gt;
&lt;p&gt;The content of the PSDiagnostics cmdlets has also changed.&lt;/p&gt;
&lt;p&gt;On V2, you have: (dir Function:Enable-PSTrace).Definition&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;$Properties = Get-LogProperties ($script:psprovidername + $script:analyticlog)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;$Properties.Enabled = $true&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;Set-LogProperties $Properties&lt;/p&gt;
&lt;p&gt;To enable Eventlog logging, instead of using wevtutil, you can do with admin privileges for example:&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;$log = New-Object -TypeName System.Diagnostics.Eventing.Reader.EventLogConfiguration -ArgumentList &amp;quot;Microsoft-Windows-NDIS/Diagnostic&amp;quot;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;$log.isEnabled = $true&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;try {&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$log.SaveChanges()&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;} catch {&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Write-Warning -Message &amp;quot;Failed to save changes because $($_.Exception.Message)&amp;quot;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;} &lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3534283" width="1" height="1"&gt;</description></item></channel></rss>