The script worked great for most of the servers and finally I was getting similar results from the scripts. I did however find, that servers with large numbers of events generate a WMI Quota Violation, which seems to imply that there are too many items in the list, which is yet another blow to WMI.
INTERVIEW PREPARATION IN 30 MINs – Read Following wires for a quick interview preparation.
- SQL Server DBA “Interview Questions And Answers”
- SQL Azure Interview Questions and Answers Part – 1
- SQL Azure Interview Questions and Answers Part – 2
- Powershell Interview Questions and Answers
gwmi -cl Win32_QuotaSetting | select caption, defaultlimit, state
This could also explain the incomplete results from previous attempts. The Quota Violation is a known problem and there is a resolution for it posted here: http://support.microsoft.com/kb/828653. To get around this problem, I changed the script again, to use the WMI query. So now that we were getting results, it was time to start testing the speed of each method.
Online PowerShell Classes @ http://tuitionaffordable.webstarts.com