If you need to individualize a monitor to run with a specific Account in SCOM, you could do it like this Powershell sample. Before importing the Managementpack please download and install the SamplePowershellMonitorWizardMP.zip, this is a really good one which easily take care of implementing Powershell script directly in the console.
https://gallery.technet.microsoft.com/Sample-Management-Pack-17b76379
After this import feel free to download my demo MP from below, but first a short explanation:
Goal: Run a powershell script monitor with a specific account.
Solution:
- Create the Runas account In SCOM:
- In your SCOM Console and below Administration and Accounts create your Windows Accounts with permissions to run a powershell script on the target server.
- Import the Management Pack below:
- Click Download from this blog and Import the MP in your Management Group
- Add the Account to the Profile:
In your SCOM Console and below Administration and Profiles add your newly created Windows Accounts to this profile:
- Export the Management Pack Coretech MP and open it with your favorite ide/text editor (VI and Notepad if you are more than 40 years old – Ronnie?)
- In your MP check the following:
and
And now your script is running as the specified user (If you remembered to distribute the account)
Share This Story, Choose Your Platform!
En kommentar
Der er lukket for kommentarer.
Notepad? I use edlin…