Beyond Impact Blog

Using MomCertImport.exe  in a Powershell Workflow to Automate Certificate Deployment on SCOM Gateways

Nov 9, 2017 7:58:21 AM / by Cole McDonald

In my continuing efforts to fully automate a SCOM environmental deployment, I've been tackling how to go about automating registering the SCOM gateways to the Management Server Pool.  I've got most of the process done, but the certificate registration has tried to elude me as the MOMcertImport tool doesn't work directly from Powershell.  Luckily, Powershell allows us to work around that using the Start-Process cmdlet to run an executable application in its own cmd.exe instance.
This requires that during the install, you're copying the MOMCertImport.exe file into your installed Gateway directory on your Gateway Server.  It also assumes that you've already acquired a .pfx file from a Certificate Authority and placed it somewhere useful.
WIthout further ado, here's the way to run MOMCertImport from Powershell (as always, note the backticks for readability):
$appPath = 'C:\Program Files\System Center Operations Manager\Gateway\MOMCertImport.exe'
$args = @(
    "/password yourCertPassHere"
Start-Process `
    -FilePath $appPath `
    -verb runas `
    -Wait `
    -ArgumentList $args


Did you find this article useful?  Let me know at

If you want to be kept informed, follow our RSS feed:

Learn more about PowerShell in Azure

Beyond Impact is a Cloud Hosting and Managed Services provider based in Minneapolis, Minnesota. 
You can learn more about our Cloud Services at

Tags: powershell, SCOM, automation

Cole McDonald

Written by Cole McDonald

Internet Pioneer, Digital Futurist

Subscribe to Email Updates

Recent Posts