SCOM 2019 R2 Powershell script monitor not running

Fabio Brandao 20 Reputation points
2024-05-06T12:47:22.1833333+00:00
I have SCOM2019 and I have problems running my scripts in PowerShell. I can't find the website: https://gallery.technet.microsoft.com/Sample-Management-Pack-17b76379. Where can I find this Management-Pack. 

Scom

Error: Script or Executable Failed to run

erroscom

Microsoft System Center
Microsoft System Center
A suite of Microsoft systems management products that offer solutions for managing datacenter resources, private clouds, and client devices.
980 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,509 questions
0 comments No comments
{count} votes

Accepted answer
  1. MotoX80 33,481 Reputation points
    2024-05-06T13:01:31.13+00:00

    You are not running Powershell. You are running VB script's cscript.exe. You need to execute Powershell.exe if you wish to run a .ps1 script.

    User's image

    0 comments No comments

2 additional answers

Sort by: Most helpful
  1. Fabio Brandao 20 Reputation points
    2024-05-06T13:31:00.0266667+00:00

    I have SCOM2019 and I have problems running my scripts in PowerShell. I can't find the website: https://gallery.technet.microsoft.com/Sample-Management-Pack-17b76379. Where can I find this Management-Pack.

    0 comments No comments

  2. Fabio Brandao 20 Reputation points
    2024-05-06T13:32:59.8666667+00:00

    Mptox80, that's exactly the problem! How do I run a powershell script since this type of monitor doesn't appear for me, as shown in the picture above! I think I have to install a Management-Pack but I can't find it to download! This path doesn't work: https://gallery.technet.microsoft.com/Sample-Management-Pack-17b76379


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.