Archive for June, 2016

Register SCOM MG to OMS using PowerShell

Monday, June 13th, 2016

System Center Advisor “OMS” offers multiple cmdlets , the full list of cmdlets could be found here
image

Last week I was working  with one my customers to register his SCOM Management Group to OMS, Due to the security restrictions we couldn’t register the Management Group via the Wizard. our last option was to use PowerShell  , the cmdlet to register a Management Group is   Register-SCAdvisor. The cmdlet requires a certificate in a PFX. don’t try to generate a certificate from your Azure portal , it is not going to work.  this is how to get the PFX

login to your OMS Subscription http://mms.microsoft.com once you see the main dashboard in the URL replace what after the Microsoft.com/ in the URL bar with the following DownloadCertificate.ashx

so the URL will be
yourworkspacename.portal.microsoft.com/DownloadCertificate.ashx

In my case my workspace name is ContosoIG the URL will be 

ContosoIG.portal.microsoft.com/DownloadCertificate.ashx
and hit enter

Before :-

image

After:- image

Save the cert in your SCOM management Server (i.e. C:\temp)
image

In SCOM PowerShell Console Type the following  
Register-SCAdvisor –CertificatePath  "C:\temp\RegistrationCert.pfx"

image

The cmdlets returns True if it succeeded