Automating Daily Task

Copper Contributor

Hello,

I am new to PowerShell and want to try using it to semi-automate a repetitive task. Any help would be greatly appreciated.

I need to open multiple websites (10+) in IE (not updated yet), they also all have acknowledgement popups. They need to open in individual tabs. I am trying to set up an easy way for someone to verify the sites are up and running daily.

1. What I would like to do is have PowerShell open each site from a text file (list) in its own tab.

2. In the same session.

3. Automatically click the OK on the acknowledgement popup.

4. If the site fails to open display the error in the tab.

 

And if this is not possible can a GUI be created in PowerShell, that lets you select each site, open them in the same session on a different tab? I am trying to do this so anyone can perform this task.

 

3 Replies

@Karen BrusterDoes it have to be IE?

It's old and really not supported any more.

 

If you could use Firefox, Chrome or Edge you could use Selenium with Powershell to do some test automation. Selenium can be scripted to drive an installed browser to interact with web sites.

 

Another possible option might be to use Invoke-WebRequest to interact with the site directly fro Powershell. Visit the site, click the button and get a response.

If it worked you could fully automate the process and just generate daily success reports and/or failure messages.

 

But perhaps a tool like prtg may be a better option for monitoring (not sure if the http module can interact with sites, not used it to that degree).

Hello
As of right now IE is the only browser it works with, i am hoping they change this soon.

I will give Invoke-WebRequest a try and see what happens.
What tool is prtg?