Calling a PowerShell script in HostMonitor
-
- Posts: 13
- Joined: Wed Jul 25, 2007 12:12 pm
Calling a PowerShell script in HostMonitor
I have a PowerShell script that I've added to Script Manager, it works fine when I take the "Lets try" option in Script Manager but when I try to execute the test in HM it fails with "Error: unable to start script". I'm running version 8.14
The start command is C:\WINDOWS\system32\windowspowershell\v1.0\powershell.exe "D:\Tools\AsyncWarning.ps1" %Params% and I've tried running this as an external script specified on the command line and also entering the script directly into Script Manager, same results.
Thanks,
Jim
The start command is C:\WINDOWS\system32\windowspowershell\v1.0\powershell.exe "D:\Tools\AsyncWarning.ps1" %Params% and I've tried running this as an external script specified on the command line and also entering the script directly into Script Manager, same results.
Thanks,
Jim
-
- Posts: 13
- Joined: Wed Jul 25, 2007 12:12 pm
I'm running Windows 2003 Server, SP2, HostMonitor is started as a service with a domain account that is part of the local administrators group.KS-Soft wrote:Sorry, we cannot reproduce the problem.
- What Windows do you use? Service Pack?
- HostMonitor started as service or application?
- Can it start some other scripts (processed by cmd.exe or cscript.exe)?
Regards
Alex
I took the bat script sample in the Script Monitor and had the same results, works in application mode and fails with "Error: unable to start script".
Thanks,
Jim
Do you mean you stop service and start application everytime you are using "Lets try" option? or you are using RCC installed on different system to setup and test script while test is performed by HostMonitor installed on different system?I took the bat script sample in the Script Monitor and had the same results, works in application mode and fails with "Error: unable to start script".
Regards
Alex
-
- Posts: 13
- Joined: Wed Jul 25, 2007 12:12 pm
Well, its really bad idea to run 2 instances using the same configuration files. We added warnings to the manual and software itself. Do you really need to do this?It does not work as a service at all unless I run hostmon.exe with the service running and take the "click No to keep service and launch 2nd instance in application mode." I've verified the service is still running when I take this option.
Ok, so problem is not related to power shell scripts. Its related to permissions - HostMonitor cannot start any external program at all. What acount is specified for the service in Windows Services applet? "Local system" account? or domain admin account?
Then you use domain admin account in HostMonitor Options dialog? Right? Could you try to specify local admin account instead of domain admin?
Regards
Alex
-
- Posts: 13
- Joined: Wed Jul 25, 2007 12:12 pm
So problem is solved?The service is running with my domain admin account, and the test seems to run ok using the local service account
Please note: local service account should be specified in Windows Services applet while admin account should be provided in HostMonitor Options dialog.
Regards
Alex
-
- Posts: 13
- Joined: Wed Jul 25, 2007 12:12 pm
Changing the logon in the Windows Services applet to local service account along with the admin account in the options dialog fixed the problem.KS-Soft wrote:So problem is solved?The service is running with my domain admin account, and the test seems to run ok using the local service account
Please note: local service account should be specified in Windows Services applet while admin account should be provided in HostMonitor Options dialog.
Regards
Alex
Thanks!
Jim