Showing posts with label Add. Show all posts
Showing posts with label Add. Show all posts

Wednesday, January 30, 2013

[OpsMgr 2012] How to Add and Remove a Management Group - VBS Script

Updated: January 31, 2012
Applies To: System Center 2012 - Operations Manager



In Operations Manager, you can create a script that can add or remove a management group from the agent.

Example

The following is an example script, which is written in VBScript, that adds or removes a management group. For more information about parameters, return values, usage, and errors, see AddManagementGroup Method or RemoveManagementGroup Method.
 
 
 
  1. Option Explicit
  2. Dim objMSConfig
  3. Set objMSConfig = CreateObject("AgentConfigManager.MgmtSvcCfg")
  4. ‘Add a management group
  5. Call objMSConfig.AddManagementGroup ("MyManagementGroupToAdd", "company.sm.net",5723)
  6. ‘Remove a management group
  7. Call objMSConfig.RemoveManagementGroup ("MyManagementGroupToRemove”)

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

Thursday, October 25, 2012

[OpsMgr 2012] How to add a product key to an eval version of System Center 2012 Operations Manager

How to add a product key to an eval version of System Center 2012 Operations Manager

 To set the product key, use the Set-SCOMLicense cmdlet in PowerShell. To use the Set-SCOMLicense cmdlet you need to use elevated permissions. (Run as Administrator).
  1. Open PowerShell as an Administrator
  2. Load the OperationsManager Module (import-module operationsmanager)
  3. Connect to your ManagementGroup (New-SCOMManagementGroupConnection)
  4. Use Set-SCOMLicense -ProductId "yourlicensekey“
  5. To check if changes were executed run Get-SCOMManagementGroup | ft skuforlicense, version, timeofexpiration –a 
 
Note: This may require a reboot after running in order to register correctly.
 
For more information on the Set-SCOMLicense cmdlet see http://technet.microsoft.com/en-us/library/hh920237.aspx



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