<?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>Top 10 Events</title><link>http://blogs.technet.com/jonathanalmquist/archive/2009/04/25/top-10-events.aspx</link><description>This will return the top ten events collected. FYI – Given the sheer number of events collected and stored in the OperationsManager database, this query may take a minute to return results. $array = @();foreach ($number in Get-Event | foreach-object {$_.get_number()})</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>re: Top 10 Events</title><link>http://blogs.technet.com/jonathanalmquist/archive/2009/04/25/top-10-events.aspx#3230497</link><pubDate>Sat, 25 Apr 2009 19:26:03 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3230497</guid><dc:creator>dmuscett</dc:creator><description>&lt;P&gt;a minute?&lt;/P&gt;
&lt;P&gt;Get-Event simply gets ALL events in the OpsDB. your loop will load them into an array... for the purpose of sorting/grouping,etc...&lt;/P&gt;
&lt;P&gt;I have tried this simple approach a while ago &lt;A href="http://www.muscetta.com/2008/01/25/looking-at-opsmgr2007-alert-trend-with-command-shell/" target=_new rel=nofollow&gt;http://www.muscetta.com/2008/01/25/looking-at-opsmgr2007-alert-trend-with-command-shell/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Powershell IS very cool, but for this type of bulk extraction you should really go TSQL...&lt;/P&gt;
&lt;P&gt;I have seen this thing throwing an OUT OF MEMORY exception even on SMALL environments with just 50 agents and the default grooming of 7 days...&lt;/P&gt;</description></item><item><title>re: Top 10 Events</title><link>http://blogs.technet.com/jonathanalmquist/archive/2009/04/25/top-10-events.aspx#3230508</link><pubDate>Sat, 25 Apr 2009 20:29:16 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3230508</guid><dc:creator>jtalmquist</dc:creator><description>&lt;P&gt;Yes. &amp;nbsp;I believe you there. &amp;nbsp;Initially, I didn't post any get-event cmdlets, because of the issue you describe. &amp;nbsp;But, I want the main&amp;nbsp;reference table to be complete. &amp;nbsp;So there it is...the get-event cmdlet in use. :-)&lt;/P&gt;</description></item></channel></rss>