Linked Questions
10 questions linked to/from PowerShell script to check the status of a URL
7 votes
3 answers
12k views
WebRequest "HEAD" light weight alternative
I recently discovered that the following does not work with certain sites, such as IMDB.com. class Program { static void Main(string[] args) { try { ...
4 votes
1 answer
16k views
Script to check the status of a URL
I have seen a few questions similar to this but have not found one that will work for my situation. I have a list of URL's stored in a text file that I need to run through to see if they return a 404 ...
2 votes
2 answers
5k views
Handling 404 Errors in PowerShell
I have a huge list of blog URLs that I need to check the validity of. I've knocked together a script from this answer and from here. Here is my script: $siteURL = 'http://example.com/' $File = '.\...
2 votes
2 answers
7k views
How do I get return values from Invoke-WebRequest
I am trying to figure out how to get results from a Invoke-WebRequest to download a file from the internet. I wrote a function but it doesn't seem to get the results. StatusCode and StatusDescription ...
2 votes
2 answers
1k views
Powershell: -ErrorAction SilentlyContinue not working with Invoke-Expression
I am running this script Invoke-Expression $expression -ErrorAction SilentlyContinue The variable $expression may not have a value sometimes. When It's empty, I get the error Cannot bind argument to ...
-1 votes
1 answer
678 views
Checking to see a website is real powershell
I have a set of URLs and I want to check if they are an actual site. I have tried this code : $Uri = $Site -as [uri] if($Uri){ ...
0 votes
1 answer
1k views
PowerShell - Test Multiple URLs from TXT/CSV file and record HTTP Code into a CSV file for reporting
Hoping someone can help with this. I built a script based on this link [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 $urlStr = Read-Host "Please enter URL to check"...
0 votes
2 answers
499 views
Return url and status codes of a large file in powershell
I have modified a large file to give me just the urls that I want to run in powershell to check the status code and return them. I am new to powershell so I am having a few issues with my code. The ...
1 vote
1 answer
769 views
Limited powershell start-jobs
I curious if you can answer this or point me in the right direction. I've written a script that tests/monitors urls. I'm not posting the code ( unless you want me to ) because there is no error in ...
2 votes
0 answers
110 views
How to check StatusCode of web request and all its dependent subrequests
I have local application and I would like to check not only a specific URL, but also all dependent assets requests (css, js, etc). Is there an easy way to do it? I had a look at this question, but it ...