Hi all, today I am going to write about “Importing the SCOM PowerShell module in your desktop” to be able to run and test your PowerShell scripts in your workstation without the necessity of being in the SCOM server.
Importing the SCOM 2016 PowerShell module
Importing the PowerShell module
- First of all, we open Powershell and we run this command so that we position ourselves in the directory where we have installed the console of SCOM and the specific the functionalities of PowerShell: CD ‘C:\Program Files\Microsoft System Center 2016\Operations Manager\Powershell\OperationsManager’ and press Enter.
- Now we are going to import the OperationsManger.psd1 module file by using the Import-Module cmdlet: Import-Module .\OperationsManager.psd1
- Once we do that we verify that the module was imported we have to type Get-module in PowerShell and press Enter.
And that’s all! now the SCOM commands that we use in our Desktop are going to work as it has to be.
Have a good day and let me know if you have any question!.