All questions related to installations, configurations and maintenance of Advanced Host Monitor (including additional tools such as RMA for Windows, RMA Manager, Web Servie, RCC).
I'm having an issue with a script output with scriptres reporting the wrong result. If I run this code directly on the server with powershell when $backup_test_pass = $false and the rest equal true it echos the correct response of "Error: Exchange DB Not backed up". If I run this through Shell Script, it outputs "Error: Exchange DB Not Backed up | Database not mounted | Mapi Connectivity Fail |" Here is the portion of the code that is doing this. For some reason when run through hostmonitor some of the variables are evaluating as false when they should evaluate as true. Script works fine ran directly in powershell.
What can we say if we do not see the code?
IMHO If code does not work correctly, then its not fine
When I run it as a normal script it outputs the correct values that I should see.
This is SBS 2008 (so effective Server 2008 SP2)
HostMonitor is running as an application
64bit system, right?
Then "normal" script in this case use 64 bit version of powershell. While HostMonitor starts 32bit version.
May be your code does not work in 32bit version. E.g. it may work incorrectly if you are using some Exchange extenstions because there are no 32bit version of components...
You may try to start 64bit powershell using command line like c:\Windows\Sysnative\windowspowershell\v1.0\powershell.exe ....