Showing posts with label Remove. Show all posts
Showing posts with label Remove. 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.

Monday, October 1, 2012

[OpsMgr 2007 R2][OpsMgr 2012] How to remove old product connectors from System Center Operations Manager

Removing an old product connector from System Center Operations Manager may be necessary if the product connector is no longer used in the environment. There is no Delete option in admin console UI for product connectors so the script below can be used to achieve the desired results.

Microsoft Support bring us a powershell script to do it in KB2626670 in Operations Manager 2007 R2 



Usage: OpsMgr2007-DeleteConnector.ps1 para1 para2
  • para1: Connector Name
  • para2: MS name, Optional, default value: localhost

In order to be able to remove an old connector in Operations Manager 2012,  has modified the script on his post >>>   Here   <<<



Usage: OpsMgr2012-DeleteConnector.ps1 para1 para2
  • para1: Connector Name
  • para2: MS name, Optional, default value: localhost



 

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