Environment: SCOM 2012 R2 with Update Rollup 11
Register SCOM Management Group:
On-premises SCOM Management Groups can be integrated to Operations Management Suite (OMS) from the SCOM Console under the administration Tab. Here, I am demonstrating a way to integrate SCOM to OMS via PowerShell cmdlets. We will integrate the SCOM to OMS using the cmdlet “Register-SCAdvisor“.
This cmdlet needs a certificate pfx file from the OMS workspace (not the certificate from the azure portal). In order to obtain this certificate, suffix “DownloadCertificate.ashx ” to your OMS workspace URL root. So the new URL will look like:
https://<workspacename>.portal.mms.microsoft.com/DownloadCertificate.ashx
Eg: in case of the workspace I am using for this demo, it will be: https://deepuomsdemo.portal.mms.microsoft.com/DownloadCertificate.ashx
Once you enter this URL to a browser after logging in to your OMS portal, you will be prompted to download the .pfx file. Save it to a folder in your SCOM management server. Before proceeding with the integration make sure that the necessary management packs for the OMS integration are imported into the Management server. For Update Rollup (UR 11), the following Management Packs (version 7.1.10226.1239) under the location “C:\Program Files\Microsoft System Center 2012 R2\Operations Manager\Server\Management Packs for Update Rollups” need to be imported:
- Microsoft.SystemCenter.Advisor.Internal.mpb
- Microsoft.SystemCenter.Advisor.mpb
- Microsoft.SystemCenter.Advisor.Resources.ENU.mpb
You can use Import-SCOMManagementPack command to import the above management packs as shown below. To see the changes brought in by the above management packs, close and reopen the SCOM console.
In most of the cases, the SCOM server will be communicating to the internet/oms via proxy. In that case, we can configure the proxy settings in the SCOM console under Administration -> Operations Management Suite -> Connection –> Configure Proxy Server. Or this can be done via Powershell with the Set-SCAdvisorProxy cmdlet as shown below. For Proxy servers, that needs authentication, “System Center Advisor Run As Profile Proxy” Profile
needs to be configured with the RunAs Account.
Now open the Operations Manager Shell and run the following command:
Register-SCAdvisor -CertificatePath <path of pfx file>
The above command will return “True” if the registration with OMS is successful. Eg:
Note that the SCOM UR11 adds support to register the Operations Manager Management group to OMS workspaces in regions other than Eastern US by using an additional optional parameter (-SettingServiceUrl), which is the URL for setting the service in the region of the workspace.
Tip: If SettingServiceUrl is not specified, the workspace is assumed to be in the Eastern US. You will get the following error message if the workspace is in a region other than Eastern US and is not explicitly mentioned in the command.
Now the SCOM Management Group is registered with the OMS Portal. However, OMS will not collect the monitoring data from the SCOM agents unless they are added as Managed Computers in the Administration Tab of SCOM Console under the Operations Management Suite container. We can add the agents to the OMS via the PowerShell cmdlet “Add-AdvisorAgent”. Eg:
One the agents are added, they will start syncing with OMS and we need to verify the OMS integration.
Verification:
We can verify the integration after a couple of hours by the following methods.
-
Via PowerShell: Run the cmdlet Get-SCAdvisorAgent to get the list of servers monitored by SCOM which are in turn syncing the data with the OMS portal.EG:
-
Via OMS Portal: Open the OMS workspace, go to Settings -> Connected Sources -> System Center. You will see the SCOM Management group listed like below. It will give you the name of the management group, Number of SCOM agents connected to the OMS and the last data update time.
-
Via SCOM Console: Navigate to Monitoring -> Operations Management Suite -> Health State. Here we can see the health status of the SCOM management servers connected to the OMS portal. Eg:
Unregister SCOM from OMS.
To unregister SCOM Management Group from OMS, please refer this excellent blog by Kevin:
Cheers.