Monday, August 19, 2013

Who is connected to my SCOM console

The following command will help to find who is connected to your SCOM console. This works for SCOM 2012.

(Get-SCOMManagementGroup).getconnectedusernames()

For SCOM 2007 you will have to use the ones below. I have not tested the below commands, though.

Get-ManagementGroupConnection | foreach-object {$_.ManagementGroup.getConnectedUserNames()}
Get-ManagementGroupConnection | foreach-object {$_.ManagementGroup.getConnectedUserNames()} | measure-object

 

Friday, July 19, 2013

Adding or removing a new SCOM zone from Om12 agent

Using Powershell:

Remove Management group

$OMCfg = New-Object -ComObject AgentConfigManager.MgmtSvcCfg;

$OMCfg.RemoveManagementGroup("zonetoberemoved")

 

Add management group

$OMCfg = New-Object -ComObject AgentConfigManager.MgmtSvcCfg;

$OmCfg.AddmanagementGroup(‘zonenametobeadded’,'MSNamewithFQCN',5723)