W2KSG: WMI Settings

WMI is like onion - the more layers you peel away the more you find.

Listing 8.10  deals with WMI settings

Get-WmiObject -Class Win32_WMISetting | Select *

This was a new one on me.  We can modify these settings

Listing 8.11

$set = Get-WmiObject -Class Win32_WMISetting
$set.BackupInterval = 60
$set.LoggingLevel = 2
$set.psbase.Put()

Get the WMI object.  Set the backup interval for the WMI database to 60 minutes (default = 30) and set the logging level to 2 (verbose  - the default is 0 = no logging).  Save the changes use Put().  Note that we have to drop into the base object with psbase

 

 

 

Technorati Tags: ,

Read the complete post at http://richardsiddaway.spaces.live.com/Blog/cns!43CFA46A74CF3E96!1785.entry

Published Wed, Oct 1 2008 14:53 by Richard Siddaway's Blog
Filed under: