Examining WMI Event Logs

Windows Management Instrumentation (WMI) is a critical component on Windows Vista and Windows Server 2008 systems. To assist in managing and maintaining this critical component, you need to adjust the WMI logging level. There are three logging levels that can be set: none, errors only, and verbose. These are numbered logging level 0, 1, and 2, respectively. These legacy logging levels are used for basic WMI tracing and also for older applications. Newer WMI applications use Event Tracing for Windows (ETW) logs. The logging level can be seen by using the following script.

Example 3-19. GetWMILogLevel.ps1

Write-host "The wmi logging level is:
$((Get-WmiObject win32_wmisetting).logginglevel)"

Making Changes to the WMI Logging ...

Get Windows PowerShell™ Scripting Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.