Recently upgraded from SCOM 2016 to 2019 and I see some powershell monitors are not working anymore.
Looks like that Operation manager powershell module is not loaded when running script .
When logged to Management Server which is running the script on the action account which supposing run this script I can run SCOM Cmdlets without issue but when checking same commands via SCOM task from console I have error that term is not recognized.
e.g Get-SCOMClass : The term 'Get-SCOMClass' is not recognized as the name of a
cmdlet, function, script file, or operable program. Check the spelling of the
name, or if a path was included, verify that the path is correct and try again.
Running scom task from console "get-modules -listavailable" also doesn't return me Operation Manager module in the list but it does when I am logged in Management Server on action account.
Anyone has some idea how to solve this ?