I am working with a 3rd party application which creates powershell scripts to place SCOM objects into and out of maintenance mode. How can SCOM be invoked via windows 2012 R2 command line by this 3rd party app and told to execute the script?
Asked
Active
Viewed 1,782 times
0
-
Have you looked at the OperationsManager Module? That provides cmdlets for putting objects into and out of maintenance mode. – Jason Morgan Sep 05 '14 at 17:25
-
Yes. But the script needs to run on a non OpsMngr server.The code I am running is: – P Davis Sep 05 '14 at 19:10
-
Yes. But the script needs to run on a non OpsMngr server. The script I am using needs to open a remote session on the server and run the cmdlets. – P Davis Sep 05 '14 at 20:21
1 Answers
2
Copy the Powershell folder from your SCOM management server (c:\Program Files\System Center 2012\Operations Manager\Powershell ) to local directory of the server which doesn’t have SCOM installation
Copy in the same directory 3 files which are located in "c:\Program Files\System Center 2012\Operations Manager\server\SDK Binaries" on your scom server.
In your powershell script add the command line
$path_operationsManager=“yourdirectoryfolder\Operationsmanager\OperationsManager.psm1”
Import-Module $path_operationsManager
new-scommanagementgroupconnection name_of_your_scomgroup

Mehdi Jerbi
- 51
- 5