Blog
By Tommy Gunn on 2/27/2010 5:09:46 AM • Rank (1381) • Views 1537
0

0

1icon19jc8 I ran across a couple of very useful cmdlets I have not noticed before that allow you to retrieve and even update OpsMgr Global Settings! You could also use this in an OpsMgr Global Settings auditing MP, using Stefan's guide R2 PowerShell monitoring as a guide. While OpsMgr 2007 does not provide the names of who changes management group settings, this seems like a good way to audit any changes.

To Retrieve All Global Settings

The get-defaultsetting cmdlet, run with no arguments, will return a list of all the OpsMgr Global Settings (names and values).

To  Retrieve a Particular Global Setting

This one will retrieve the current value of the AlertAutoResolveDays setting – the day after which unresolved alerts are automatically closed.

get-defaultsetting | where `
{$_.Name -eq 'ManagementGroup\AlertResolution\AlertAutoResolveDays'}

While this is an interesting cmdlet, it's seems to be written for reading. There is a separate cmdlet just for updating Global Settings values.

To Update a Global Setting

This one-liner (updated to wrap lines) will update the Alert Auto-Resolve Settings in OpsMgr Global Settings, updating from the default value of 30 days to a value 25 days


set-defaultsetting `
-name ManagementGroup\AlertResolution\AlertAutoResolveDays `
-value 25

Conclusion

Hope you find this helpful. If you do any sort of monitoring or scripting with these cmdlets, it would be great to hear about what you're up to.

Comments (1) - Comment RSS
Tom Riddle wrote: on Jan 19, 2011 07:30 PM
Good for seeing all the options for things missing in the UI like

Name : HealthService\ProxyingEnabled

For setting agents to do proxyingenabled by default...


Who Viewed
Who Reviewed
Categories
Related Pages
Shortened URL
http://tinyurl.com/yzttn27

Top Contributors
Featured Members
Pete Zerger
Points: 65622
Level: System Center Expert
Tommy Gunn
Points: 42748
Level: System Center Expert
Simon Skinner
Points: 40804
Level: System Center Expert
Stefan Koell
Points: 28999
Level: System Center Expert
Andreas Zuckerhut
Points: 27734
Level: System Center Expert