I’m newbie to Powershell.
As part of routine health check, i need to monitor several web application servers manually using URL for each server. just wondering if I could get status of all web server components in single file (html/txt/csv) would make my job easy.
to start, I used ‘Invoke-webrequest’ followed by RawContent where I see expected output (ex. Cognos-ContentManager-State: running in below expample) but with more un-necessary information.
so how do I get specific contents from each URL…
I’m expecting output something like,
URL Component Status
PS C:\WINDOWS\system32> $webpage=Invoke-webrequest “http://myserver:9300/p2pd/servlet”
HTTP/1.1 200 OK
Date: Fri, 10 Feb 2017 14:28:10 GMT