Powershell script suddenly returns "Good" when sho

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).
Post Reply
norphf
Posts: 12
Joined: Wed Jun 08, 2005 2:04 am
Contact:

Powershell script suddenly returns "Good" when sho

Post by norphf »

Hi

I have a powershell script check:
Executing the powershell with Start cmd:
C:\Windows\sysnative\WindowsPowerShell\v1.0\powershell.exe "C:\JDMScripts\CheckLUNFreeSpaceWarn_new.ps1"

"Reverse alert" is NOT enabled ;)

If I run the script manually it returns:
ScriptRes:Bad:LUN01: 63 GB, LUN03: 124 GB, LUN05: 89 GB

Can someone help me with why it suddenly doesn't work?

Regards Lars
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

How can we help if we don't see script code?
What exactly it should check and why do you think it does not work properly?
Windows? Service Pack?

Regards
Alex
norphf
Posts: 12
Joined: Wed Jun 08, 2005 2:04 am
Contact:

Post by norphf »

I can see that I didn't wrote that the check and powershell script HAS been working.
So why dosen't it any more?
We haven't upgraded Hostmonitor.
I don't believe the Server has been Windows Updated lately.
The script hasn't been changed, and the check hasn't been changed.
The Hostmonitor agent might have been upgraded.

So for some reason do hostmonitor not get the correct result from the powershell script.

So how can I see what happens when Hostmonitor executes the script/how can I see the powershell output?
Is the "Start cmd" correct, or is there a better way?
Or is the line the script returns not correct/is there a better way?
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

I can see that I didn't wrote that the check and powershell script HAS been working.
So why dosen't it any more?
How can we answer if we do not see your script?
So how can I see what happens when Hostmonitor executes the script/how can I see the powershell output?
Add code (into your script) that will log some useful data.

Regards
Alex
norphf
Posts: 12
Joined: Wed Jun 08, 2005 2:04 am
Contact:

Post by norphf »

Thank you for your very helpful responses.

As I said earlier, the script has worked, and isn't changed...

But I found the error, which were something as simple as the password to the account who ran the RMA service had been changed.

Regards Lars
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

Thank you for your very helpful responses.
It was not helpful because we have 0 information regarding your script and you did not provide script code.
But I found the error, which were something as simple as the password to the account who ran the RMA service had been changed.
This means RMA was running under "local system" account and your script requires some permissions beside local system.

Regards
Alex
Post Reply