OK, I'm missing something incredibly basic I have a feeling -
I'm trying to run a powershell script via Kaseya - I've got a ps1 file that returns what I need - I can run it directly on the server fine, and get exactly what I need. It seems I should be able to run it from within Kaseya, either via the "Execute Shell procedure" command or the new Execute Powershell command. However neither of these seem to work.
From the command line if I simply run this it works great:
powershell.exe -PSConsoleFile "C:\Program Files\Microsoft\Exchange Server\Bin\exshell.psc1" c:\temp\mailstats.ps1
So how do you call a ps1 file from within an agent procedure like this?
Thanks in advance.....
Try running an Execute Shell procedure like the following and let us know how it works:
C:\Windows\Sysnative\WindowsPowerShell\v1.0\powershell.exe -PSConsoleFile "C:\Program Files\Microsoft\Exchange Server\Bin\exshell.psc1" c:\temp\mailstats.ps1