Use Powershell v3.

http://jdhitsolutions.com/blog/2012/12/friday-fun-scraping-the-web-with-powershell-v3/

>From https://www.google.com/search?btnG=1&pws=0&q=invoke-webrequest+scrape

(Note the PoSH 3 is not installed on Win7 by default.)




On Fri, Nov 1, 2013 at 11:22 AM, Jimmy Tran <[email protected]> wrote:

>  Ok, so lets ignore number 3.  How am I supposed to search the strings?
> Am I running a script or an app?  Can you give me some insight on what you
> are suggesting so I can research this?  I only have a few hours left to get
> this accomplished.****
>
> ** **
>
> Thanks,****
>
>
> jimmy****
>
> ****
>
> ** **
>
> *From:* [email protected] [mailto:
> [email protected]] *On Behalf Of *Daniel Chenault
> *Sent:* Friday, November 01, 2013 7:55 AM
> *To:* [email protected]
>
> *Subject:* Re: [NTSysADM] RE: test IE uptime?****
>
>  ** **
>
> 3. The list of running apps does not show status nor is that a very
> reliable way of determining if an app is truly hung. Only thing I can think
> of here is a blind restart of IE on a periodic basis. Perhaps the IE SDK
> has a clue (don’t have this myself)****
>
>  ****
>
> 4. Then that’s easy; only two strings to search for. “511 Transit
> Departures” = success, “sign problem” indicates a known failure state while
> anything else is an unknown failure state. ****
>
>  ****
>
> *From:* Jimmy Tran <[email protected]> ****
>
> *Sent:* Friday, November 01, 2013 9:03 AM****
>
> *To:* [email protected] ****
>
> *Subject:* RE: [NTSysADM] RE: test IE uptime?****
>
>  ****
>
> 3.  Does a list of running apps still apply is IE is
> frozen/stuck/non-responsive.  I guess that would need to be tested but I
> don’t know how to create such a failure.****
>
>  ****
>
> 4.  If the page were to load, it would say “511 Transit Departures” in the
> header.  If it doesn’t load, it would show the default page not found be IE
> when there is no network connectivity.  If the 511.org site is down, or
> the specific page for that station is down, it would say “Sign Problem. Try
> calling 511 and say “Departure Times”****
>
>  ****
>
> I don’t have any control over the page, and I don’t know what language was
> used to build the page.  As unfortunately, I don’t think the stakeholders
> know the answer to that either.****
>
>  ****
>
> *From:* [email protected] [
> mailto:[email protected] <[email protected]>] *On
> Behalf Of *Daniel Chenault
>
> *Sent:* Friday, November 01, 2013 6:36 AM
> *To:* [email protected]
>
> *Subject:* Re: [NTSysADM] RE: test IE uptime?****
>
>   ****
>
> Okay, MUCH better. Since the need has shown itself to be mission-critical
> perhaps an app would be better than a script; provides more functionality
> to the developer.****
>
>  ****
>
> 1. As you say, from the system log ****
>
> 2. Ping the host. Fail is written to a local log for later transmittal.***
> *
>
> 3. Check running list of apps****
>
> 4. Is there a word or group of words in the webpage that ALWAYS appears on
> successful load but NEVER appears in a failed load? More to the point, are
> you in control of the page’s contents? What language is used to build the
> page – perhaps the last command in the load could set a flag; then you can
> check for that.****
>
>  ****
>
> *From:* Jimmy Tran <[email protected]> ****
>
> *Sent:* Thursday, October 31, 2013 11:39 PM****
>
> *To:* [email protected] ****
>
> *Subject:* RE: [NTSysADM] RE: test IE uptime?****
>
>  ****
>
> So let me explain the situation.****
>
>  ****
>
> These are 40” displays connected to a w7 box all enclosed inside of a
> protective case.  The displays are at train stations, bus stops, and light
> rail stations.  If the machine were to be turned on, it would power up,
> wait for network connectivity and start a scheduled task which would load
> IE in kiosk mode.  IE would have a specific home page set for that
> location.  Then the page refreshes every 10 seconds to update the display.
> ****
>
>  ****
>
> We have no control or access to the 511.org server who hosts the webpages
> and transit times.  All we have access to is the standalone kiosk.  The
> test is to determin iif the home page ever fails to refresh/reload.  We
> just want to make sure if the page does not load for whatever reason it
> might be, that it is  logged and documented.****
>
>  ****
>
> If it were to fail, it would be due to the following reasons:****
>
> 1.       Machine loss power – system up time would tell us that****
>
> 2.       4g or wifi connection went out – currently no way to log this****
>
> 3.       IE process crashed – currently no way to log this****
>
> 4.       511 page is offline – currently no way to log this.****
>
>  ****
>
> So to sum it up, I need to find a solution that can answer items 2,3, and
> 4.  I figured a script running on the host that could somehow search the
> page for key words and if it fails, it records it to a txt file.****
>
>  ****
>
> Jimmy****
>
>  ****
>
> *From:* [email protected] [
> mailto:[email protected] <[email protected]>] *On
> Behalf Of *Richard Stovall
>
> *Sent:* Thursday, October 31, 2013 7:14 PM
> *To:* [email protected]
>
> *Subject:* Re: [NTSysADM] RE: test IE uptime?****
>
>  ****
>
> What type of error?****
>
>  ****
>
> There's almost certainly a way to do what you're looking for with wget, or
> Powershell, or another scripting language, if what you're really trying to
> gauge is what the server is doing.  I think that's the key question at the
> moment.  Are you trying to record and interpret a particular client
> response, or are you actually looking to make sure the server is doing what
> *it* is supposed to be doing.  (Or some combination of both, which might
> entail separate monitoring straegies.)****
>
>  ****
>
> On Thu, Oct 31, 2013 at 10:04 PM, Jimmy Tran <[email protected]>
> wrote:****
>
> That was just a political requirement made by people who don't understand
> computers. I'm not sure if other browsers can run in kiosk mode.
>
> The main thing we need to know is if the webpage displays an error during
> a period of 7 days we need to be notified.
>
> What were you thinking? ****
>
>
> Sent from my Samsung Galaxy S4 ****
>
> -----Original Message-----
> *From:* Richard Stovall [[email protected]]****
>
> *Received:* Thursday, 31 Oct 2013, 6:57pm
> *To:* [email protected] [[email protected]]
> *Subject:* Re: [NTSysADM] RE: test IE uptime?****
>
> Let me rephrase the question.****
>
>  ****
>
> Does IE *have* to be the rendering engine?****
>
>  ****
>
> If yes, why?  Are you testing IE's (a client's) ability to render a server
> response correctly, or are you really trying to monitor the server itself?
> There's likely a big difference here in terms of what is easy to do and
> what is not. ****
>
>  ****
>
> On Thu, Oct 31, 2013 at 9:49 PM, Jimmy Tran <[email protected]> wrote:
> ****
>
> Yes ****
>
>
>
> Sent from my Samsung Galaxy S4 ****
>
> -----Original Message-----
> *From:* Richard Stovall [[email protected]]
> *Received:* Thursday, 31 Oct 2013, 6:45pm
> *To:* [email protected] [[email protected]]****
>
> *Subject:* Re: [NTSysADM] RE: test IE uptime?****
>
> Does IE have to be the rendering engine?****
>
>  ****
>
> On Thu, Oct 31, 2013 at 9:05 PM, Jimmy Tran <[email protected]> wrote:
> ****
>
> If there's a cost associated, that may be ok. There really isn't a budget
> allocated for this but if it's cheaper to buy a software than me writing
> some scripts that might be a better way to go.
>
> You provide some great keywords to do some searching on thanks! ****
>
>
>
> Sent from my Samsung Galaxy S4 ****
>
> -----Original Message-----
> *From:* Ken Schaefer [[email protected]]
> *Received:* Thursday, 31 Oct 2013, 5:56pm
> *To:* [email protected] [[email protected]]
> *Subject:* RE: [NTSysADM] RE: test IE uptime?****
>
> Well, the basic concept you are looking at is “end user experience
> monitoring”, as opposed to “component monitoring” (e.g. a server or hard
> disk) or “service monitoring” (e.g. is a website up)****
>
>  ****
>
> There’s plenty of third party products out there that can simulate client
> actions – usually via an agent installed on the remote machine. Or you do a
> “poor man’s” job and do this yourself with a bit of scripting. I assumed
> you wanted the latter since you didn’t mention any existing tools you have
> or any budget.****
>
>  ****
>
> Cheers****
>
> Ken****
>
>  ****
>
> *From:* [email protected] [mailto:
> [email protected]] *On Behalf Of *Jimmy Tran
> *Sent:* Friday, 1 November 2013 11:45 AM
> *To:* [email protected]
> *Subject:* RE: [NTSysADM] RE: test IE uptime?****
>
>  ****
>
> I will look in to that. Any other ideas? ****
>
>
> Sent from my Samsung Galaxy S4
>
> -----Original Message----- ****
>
> *From:* Ken Schaefer [[email protected]]
> *Received:* Thursday, 31 Oct 2013, 5:30pm
> *To:* [email protected] [[email protected]]
> *Subject:* [NTSysADM] RE: test IE uptime? ****
>
> Write a little script (e.g. using VBScript and ServerXMLHTTP object) that
> makes the same HTTP request? You can then log the details to a log file to
> later analyse.****
>
>  ****
>
> Cheers****
>
> Ken****
>
>  ****
>
> *From:* [email protected] [
> mailto:[email protected] <[email protected]>] *On
> Behalf Of *Jimmy Tran
> *Sent:* Friday, 1 November 2013 11:21 AM
> *To:* [email protected]
> *Subject:* [NTSysADM] test IE uptime?****
>
>  ****
>
> I’ve been tasked with determining a way to document if a web page in IE
> errors out.  Basically, the page will refresh every 10 seconds with updated
> data.  I need to find a way to see if the page comes back with a page error
> or not.  Any ideas out there?  These tests will be performed at kiosks that
> have no management that have poor internet connectivity.****
>
>  ****
>
> All I can currently measure is system up time, not internet connectivity
> uptime or page errors in IE.****
>
>  ****
>
> TIA****
>
>  ****
>
> Jimmy ****
>
>  ****
>
>  ****
>
>  ****
>
>  ****
>

Reply via email to