Hello!
I'm working on a monitor to execute a multiple SQL queries and manipulate the data. To do so, I am using the Invoke-Sqlcmd cmdlet to run the query. The script works just fine when saved as a ps1 file and run manually on the server.
BUT, in SAM, it gives the following error:
So after some research, I decided to check the Powershell version, and it shows as 1.0 in the application monitor.
Any ideas on why this is happening? I'm running the script as Local and impersonating credentials: