View previous topic :: View next topic |
Author |
Message |
norphf
Joined: 08 Jun 2005 Posts: 12
|
Posted: Fri Jul 01, 2016 3:26 am Post subject: Powershell script suddenly returns "Good" when sho |
|
|
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 |
|
Back to top |
|
|
KS-Soft
Joined: 03 Apr 2002 Posts: 12795 Location: USA
|
Posted: Fri Jul 01, 2016 4:59 am Post subject: |
|
|
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 |
|
Back to top |
|
|
norphf
Joined: 08 Jun 2005 Posts: 12
|
Posted: Fri Jul 01, 2016 6:30 am Post subject: |
|
|
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? |
|
Back to top |
|
|
KS-Soft
Joined: 03 Apr 2002 Posts: 12795 Location: USA
|
Posted: Fri Jul 01, 2016 6:55 am Post subject: |
|
|
Quote: | 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?
Quote: | 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 |
|
Back to top |
|
|
norphf
Joined: 08 Jun 2005 Posts: 12
|
Posted: Tue Jul 05, 2016 3:07 am Post subject: |
|
|
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 |
|
Back to top |
|
|
KS-Soft
Joined: 03 Apr 2002 Posts: 12795 Location: USA
|
Posted: Tue Jul 05, 2016 11:31 am Post subject: |
|
|
Quote: | 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.
Quote: | 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 |
|
Back to top |
|
|
|