Lee Holmes twitted recently the following:
It’s available on the PowerShell gallery: resolve-uri.ps1
It appears that I wrote another script to achieve the same because of VSCode that introduced another redirect back in November.
Mine looks like this:
- What are the differences between the 2 approaches?
- Mine sends back only a single string in the output stream while his solution sends all the URI used and being redirected:
- Mine uses a recursive approach and his approach uses a while loop.
- Mine shows in the verbose stream what kind of redirect happened, if it’s a temporary redirect or if it’s permanent.
As usual, there are always more than one way to skin a cat 😀