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

 


Share this post :

 

Technorati Tags: ,

About these ads
This entry was posted in PowerShell and WMI. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s