Monday, February 20, 2012

[OpsMgr 2007] Play with defaults settings of a management group

Here is the 2 cmdlet to know to get and set the default settings of a SCOM management group.


>>>>>>>>>>   Get-DefaultSetting   <<<<<<<<<<

NAME :     Get-DefaultSetting
SYNOPSIS :  Gets the default settings for a management group.
SYNTAX :  Get-DefaultSetting [[-Path] [<String[]>]] [<CommonParameters>]
DETAILED DESCRIPTION :  Gets the default  settings for a management group.
PARAMETERS
    -Path [<String[]>]
        Specifies the path or set of paths to the management groups for which to retrieve default settings. To enter multiple values, separate them by using commas.
    <CommonParameters>
        This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, and -OutVariable. For more information, type, "get-help about_commonparameters".


>>>>>>>>>>   Set-DefaultSetting   <<<<<<<<<<

NAME :     Set-DefaultSetting
SYNOPSIS :    Sets default settings.
SYNTAX :
    Set-DefaultSetting [-Name] <String> [-Value] <String> [[-Path] [<String[]>]] [-WhatIf] [-Confirm] [<CommonParameters>]
    Set-DefaultSetting [-Setting] <DefaultSettingBase[]> [[-Path] [<String[]>]] [-WhatIf] [-Confirm] [<CommonParameters>]
DETAILED DESCRIPTION :    Sets default settings.
PARAMETERS :
    -Name <String>
        Specifies the name of the default setting. The name is case-sensitive.
    -Value <String>
        Specifies the value of the default setting.
    -Path [<String[]>]
        Specifies the path or set of paths to the management groups to which to apply the default settings.
    -WhatIf
        Describes what would happen if you executed the command without actually executing the command.
    -Confirm
        Prompts you for confirmation before executing the command.
    -Setting <DefaultSettingBase[]>
        Specifies a set of default setting objects.
    <CommonParameters>
        This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, and -OutVariable. For more information, type, "get-help about_commonparameters".


 What are the different setting we can get and set :
  1. Agent\Heartbeats\Interval
  2. HealthService\ProxyingEnabled
  3. ManagementGroup\AlertCustomFieldSettings\CustomField1
  4. ManagementGroup\AlertCustomFieldSettings\CustomField10
  5. ManagementGroup\AlertCustomFieldSettings\CustomField2
  6. ManagementGroup\AlertCustomFieldSettings\CustomField3
  7. ManagementGroup\AlertCustomFieldSettings\CustomField4
  8. ManagementGroup\AlertCustomFieldSettings\CustomField5
  9. ManagementGroup\AlertCustomFieldSettings\CustomField6
  10. ManagementGroup\AlertCustomFieldSettings\CustomField7
  11. ManagementGroup\AlertCustomFieldSettings\CustomField8
  12. ManagementGroup\AlertCustomFieldSettings\CustomField9
  13. ManagementGroup\AlertResolution\AlertAutoResolveDays
  14. ManagementGroup\AlertResolution\HealthyAlertAutoResolveDays
  15. ManagementGroup\ClientMonitoringSettings\ErrorTransmissionFilters
  16. ManagementGroup\ClientMonitoringSettings\ExceptionFolders
  17. ManagementGroup\ClientMonitoringSettings\MaxNumberOfCabsToCollect
  18. ManagementGroup\ClientMonitoringSettings\PolicyResponseUrl
  19. ManagementGroup\ClientMonitoringSettings\PublishMicrosoftDataCollectionRequest
  20. ManagementGroup\ClientMonitoringSettings\PublishMicrosoftFileCollectionRequests
  21. ManagementGroup\ClientMonitoringSettings\PublishMicrosoftMemoryDumpRequests
  22. ManagementGroup\ClientMonitoringSettings\PublishMicrosoftRegistryCollectionRequests
  23. ManagementGroup\ClientMonitoringSettings\PublishMicrosoftSolutionLinks
  24. ManagementGroup\ClientMonitoringSettings\PublishMicrosoftSurveyLinks
  25. ManagementGroup\ClientMonitoringSettings\PublishMicrosoftWMIQueryRequests
  26. ManagementGroup\CustomerExperienceImprovementProgramEnabled
  27. ManagementGroup\DataWarehouse\DataWarehouseDatabaseName
  28. ManagementGroup\DataWarehouse\DataWarehouseServerName
  29. ManagementGroup\DataWarehouse\ReportingServerUrl
  30. ManagementGroup\ErrorReporting\QueueErrorReports
  31. ManagementGroup\ErrorReporting\SendErrorReports
  32. ManagementGroup\PartitioningAndGroomingSettings\AlertDaysToKeep
  33. ManagementGroup\PartitioningAndGroomingSettings\AvailabilityHistoryDaysToKeep
  34. ManagementGroup\PartitioningAndGroomingSettings\EventDaysToKeep
  35. ManagementGroup\PartitioningAndGroomingSettings\JobStatusDaysToKeep
  36. ManagementGroup\PartitioningAndGroomingSettings\MaintenanceModeHistoryDaysToKeep
  37. ManagementGroup\PartitioningAndGroomingSettings\MonitoringJobDaysToKeep
  38. ManagementGroup\PartitioningAndGroomingSettings\PerformanceDataDaysToKeep
  39. ManagementGroup\PartitioningAndGroomingSettings\PerformanceSignatureDaysToKeep
  40. ManagementGroup\PartitioningAndGroomingSettings\StateChangeEventDaysToKeep
  41. ManagementGroup\SendOperationalDataReports
  42. ManagementGroup\WebAddresses\OnlineProductKnowledge
  43. ManagementServer\AutoApproveManuallyInstalledAgents
  44. ManagementServer\MissingHeartbeatThreshold
  45. ManagementServer\ProxyAddress
  46. ManagementServer\ProxyPort
  47. ManagementServer\RejectManuallyInstalledAgents
  48. ManagementServer\UseProxyServer
  49. NotificationServer\WebAddresses\WebConsole

 --------------  EXAMPLE 1 --------------
 C:\PS>set-defaultsetting `
 -name HealthService\ProxyingEnabled `
 -value True

 This command sets the default setting agent Proxying enabled to True. Be carefull, the name of the setting is case-sensitive.

--------------  EXAMPLE 2 --------------
C:\PS>get-defaultsetting

This command gets the default settings for all connected management groups.

This posting is provided "AS IS" with no warranties.

1 comment:

  1. Great..!! It is working...! thanks for posting Tristan :-)

    ReplyDelete