From the course: Complete Guide to PowerShell 7

Unlock this course with a free trial

Join today to access over 24,400 courses taught by industry experts.

Automating web operations

Automating web operations

- [Instructor] Now, another capability available to us is the ability to use that invoke web request and retrieve information from static information, like a site for example. So let's just click on here. I've got a link, localhost:9090. Let's open the browser, and there's my test page. It's a web browser page. It's just HTML. It's got some names, it's got some statuses, and it's got some dates. So let's minimize that. What I want to be able to do is just simply grab that. So I could, say, invoke the request to that one, run that selection, and then what I should be able to do is just say, notepad site.html, and it gives me the HTML data, like, just to completely dump down the website. Now, that's not particularly helpful because of course we just taken the HTML of the website, and that may not include everything. That may not include any of the JavaScript that might be in the page, et cetera. What we can do though, is we can scrape data specifically from the page. So if I go ahead…

Contents