[Xymon] [External] PS client enhancement of ServiceCheck
Beck, Zak
zak.beck at accenture.com
Mon Oct 22 14:16:51 CEST 2018
Hi
It's your use of -inotin that is not working with Powershell v2 - v2 does not support in/notin.
The workaround is this:
(0..6 -notcontains $MaintDay) -or (0..23 -notcontains $MaintStartHour)
I have included this in the latest version but I'm testing some other updates before release.
Thanks
Zak
-----Original Message-----
From: Storer, Raymond <storerr at nibco.com>
Sent: Friday, 19 October 2018 16:24
To: xymon at xymon.com
Cc: tlwilliams4 at vcu.edu; Beck, Zak <zak.beck at accenture.com>
Subject: RE: [Xymon] [External] PS client enhancement of ServiceCheck
Tim, does starting powershell.exe with the command line parameter of "-Version 2.0" help at all?
-----Original Message-----
Date: Thu, 18 Oct 2018 12:24:10 -0400
From: Timothy Williams <tlwilliams4 at vcu.edu>
To: zak.beck at accenture.com
Cc: xymon at xymon.com
Subject: Re: [Xymon] [External] PS client enhancement of ServiceCheck
Message-ID:
<CAMVnr4NC7B7oEMYcOd5bU_JN5b58R9pmgZpZ1mLGfb+NoJY_hw at mail.gmail.com>
Content-Type: text/plain; charset="utf-8"
Zak, all
I pushed my revised script out to a few servers. Most all have upgraded powershell, but a few 2008 & 2008R2 still have PS v2. Script will not start, but no clear error about why. It runs fine on the '08 servers with PS v3, v4, or v5. The ones with v2 seem to be running the script in a v1 instance. Error: Program C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe for service XymonPSClient exited with return code 4294770688. Any way to force it to run in v2? Or do you see anything in the new function that would choke v1?
On Tue, Oct 9, 2018 at 9:28 AM Timothy Williams <tlwilliams4 at vcu.edu> wrote:
> Sounds good to me. I've only been powershell coding a year, so I'm
> sure there are more elegant and efficient ways than what I've devised.
> Tim
>
________________________________
CONFIDENTIALITY NOTICE: This email and any attachments are for the exclusive and confidential use of the intended recipient. If you are not the intended recipient, please do not read, distribute or take action in reliance upon this message. If you have received this in error, please notify us immediately by return email and promptly delete this message and its attachments from your computer system. We do not waive attorney-client or work product privilege by the transmission of this message.
________________________________
This message is for the designated recipient only and may contain privileged, proprietary, or otherwise confidential information. If you have received it in error, please notify the sender immediately and delete the original. Any other use of the e-mail by you is prohibited. Where allowed by local law, electronic communications with Accenture and its affiliates, including e-mail and instant messaging (including content), may be scanned by our systems for the purposes of information security and assessment of internal compliance with Accenture policy. Your privacy is important to us. Accenture uses your personal data only in compliance with data protection laws. For further information on how Accenture processes your personal data, please see our privacy statement at https://www.accenture.com/us-en/privacy-policy.
______________________________________________________________________________________
www.accenture.com
More information about the Xymon
mailing list