KS-Soft. Network Management Solutions
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister    ProfileProfile    Log inLog in 

Powershell script suddenly returns "Good" when sho

 
Post new topic   Reply to topic    KS-Soft Forum Index -> Configuration, Maintenance, Troubleshooting
View previous topic :: View next topic  
Author Message
norphf



Joined: 08 Jun 2005
Posts: 12

PostPosted: Fri Jul 01, 2016 3:26 am    Post subject: Powershell script suddenly returns "Good" when sho Reply with quote

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
View user's profile Send private message Visit poster's website
KS-Soft



Joined: 03 Apr 2002
Posts: 12795
Location: USA

PostPosted: Fri Jul 01, 2016 4:59 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
norphf



Joined: 08 Jun 2005
Posts: 12

PostPosted: Fri Jul 01, 2016 6:30 am    Post subject: Reply with 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?
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
View user's profile Send private message Visit poster's website
KS-Soft



Joined: 03 Apr 2002
Posts: 12795
Location: USA

PostPosted: Fri Jul 01, 2016 6:55 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
norphf



Joined: 08 Jun 2005
Posts: 12

PostPosted: Tue Jul 05, 2016 3:07 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
KS-Soft



Joined: 03 Apr 2002
Posts: 12795
Location: USA

PostPosted: Tue Jul 05, 2016 11:31 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    KS-Soft Forum Index -> Configuration, Maintenance, Troubleshooting All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

KS-Soft Forum Index