<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.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>Windows Event Log in PowerShell - Part II</title><link>http://blogs.msdn.com/powershell/archive/2009/06/11/windows-event-log-in-powershell-part-ii.aspx</link><description>In part 1 of “ Event logs in Powershell ” we talked about differences between Get-EventLog and Get-WinEvent. In this second part we will dig deeper into Get-WinEvent. Starting in Windows Vista, the Windows Event Log was updated to provide a more powerful</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>re: Windows Event Log in PowerShell - Part II</title><link>http://blogs.msdn.com/powershell/archive/2009/06/11/windows-event-log-in-powershell-part-ii.aspx#9726930</link><pubDate>Thu, 11 Jun 2009 19:18:08 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9726930</guid><dc:creator>Don Jones</dc:creator><description>&lt;p&gt;You know, in that last example, does the cmdlet's -computerName parameter support an array? If so, it'd be more straightforward to keep your computer names in a flat file than a CSV (e.g., one name per line with no header). Then you could just use (gc computers.txt) for the -computername parameter and eliminate a ForEach-Object. Or, if -computerName can be pipeline-bound ByPropertyName, you could pipe the output of Import-CSV directly to Get-WinEvent, right? Eliminating ForEach situations is desirable simply because it's less intuitive to newcomers.&lt;/p&gt;</description></item><item><title>re: Windows Event Log in PowerShell - Part II</title><link>http://blogs.msdn.com/powershell/archive/2009/06/11/windows-event-log-in-powershell-part-ii.aspx#9727844</link><pubDate>Fri, 12 Jun 2009 00:21:27 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9727844</guid><dc:creator>srikanth</dc:creator><description>&lt;p&gt;Hi, I liked your cmd window color and font. I tried to setup my cmd window like yours but I didn't find the same fon. Can you tell us your cmd window properties?&lt;/p&gt;</description></item><item><title>re: Windows Event Log in PowerShell - Part II</title><link>http://blogs.msdn.com/powershell/archive/2009/06/11/windows-event-log-in-powershell-part-ii.aspx#9737661</link><pubDate>Fri, 12 Jun 2009 22:12:35 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9737661</guid><dc:creator>bonarez</dc:creator><description>&lt;p&gt;yeah you can provide multiple computers in the -computername 'array' but it's very simple:&lt;/p&gt;
&lt;p&gt;$yesterday = (get-date).AddDays(-1)&lt;/p&gt;
&lt;p&gt;get-eventlog -logname application &amp;nbsp;-after $yesterday -computername server5,server6 |where {$_.eventID -eq 101} |format-list username&lt;/p&gt;
&lt;p&gt;actually using this every day to search for folder redirection errors, bit slow but hey..&lt;/p&gt;</description></item><item><title>re: Windows Event Log in PowerShell - Part II</title><link>http://blogs.msdn.com/powershell/archive/2009/06/11/windows-event-log-in-powershell-part-ii.aspx#9745752</link><pubDate>Sat, 13 Jun 2009 20:41:42 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9745752</guid><dc:creator>n4cer</dc:creator><description>&lt;p&gt;The font used is Calibri, one of the ClearType fonts included in Windows Vista/Office 2007 and higher. It's likely not actually used as their shell font as it isn't fixed-width. The PowerShell &amp;quot;windows&amp;quot; on this page are HTML.&lt;/p&gt;
&lt;p&gt;You could try to get it working following these steps (restart required after the mod):&lt;/p&gt;
&lt;p&gt;&lt;a rel="nofollow" target="_new" href="http://support.microsoft.com/default.aspx?scid=kb;EN-US;Q247815"&gt;http://support.microsoft.com/default.aspx?scid=kb;EN-US;Q247815&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;but you'd probably need an alternative console host.&lt;/p&gt;
&lt;p&gt;If you don't already, you can instead use Consolas (a fixed-width ClearType font made for this scenario). It's available out of the box in Windows 7 RC's console configuration settings. For downlevel platforms, you'll need to register it manually as above. A PowerShell script is also available:&lt;/p&gt;
&lt;p&gt;&lt;a rel="nofollow" target="_new" href="http://blogs.msdn.com/powershell/archive/2006/10/16/Windows-PowerShell-Font-Customization.aspx"&gt;http://blogs.msdn.com/powershell/archive/2006/10/16/Windows-PowerShell-Font-Customization.aspx&lt;/a&gt;&lt;/p&gt;</description></item><item><title>re: Windows Event Log in PowerShell - Part II</title><link>http://blogs.msdn.com/powershell/archive/2009/06/11/windows-event-log-in-powershell-part-ii.aspx#9791093</link><pubDate>Fri, 19 Jun 2009 20:38:14 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9791093</guid><dc:creator>Kevin Woley</dc:creator><description>&lt;p&gt;Unfortunately Get-WinEvent does not support arrays for the -ComputerName parameter. Otherwise, Don would be right that the simplest thing to do would be to pass in a list of machines.&lt;/p&gt;</description></item><item><title>Provider has no events logged</title><link>http://blogs.msdn.com/powershell/archive/2009/06/11/windows-event-log-in-powershell-part-ii.aspx#9886183</link><pubDate>Thu, 27 Aug 2009 03:26:48 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9886183</guid><dc:creator>Aniket M</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;How to recover if the provider has no events logged at present ?&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;</description></item><item><title>re: Windows Event Log in PowerShell - Part II</title><link>http://blogs.msdn.com/powershell/archive/2009/06/11/windows-event-log-in-powershell-part-ii.aspx#9905944</link><pubDate>Sun, 11 Oct 2009 23:05:05 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9905944</guid><dc:creator>Jp</dc:creator><description>&lt;p&gt;Hi there&lt;/p&gt;
&lt;p&gt;Hope your well&lt;/p&gt;
&lt;p&gt;how can i output this to a log file in real time ? can this script be modified to monitor the event logs in real time and output to file ?&lt;/p&gt;
&lt;p&gt;psloglist from the pstools was nearly exactly what i was looking apart from that the when outputting to the stdout to file the buffer is delayed by 4kb before it was flushed thus missing event's until 4kb had been reached.&lt;/p&gt;
&lt;p&gt;I need a solution that will output events in realtime to a log file, the desired results will then be via a perl script and posted to a db.&lt;/p&gt;
&lt;p&gt;thanks in advance&lt;/p&gt;</description></item></channel></rss>