Forum Discussion
PowerSheller
Sep 23, 2021Copper Contributor
Powershell downloads the login webpage html instead of a file
Hello I have a website.com where I login via a form and it has a second step authentication too. After I fully login, a session starts and I can type a specific url in the address bar of IE/Edge ...
MikeCrowley
Sep 26, 2021Iron Contributor
Depending on how that web site handles authentication, you may need to figure that out first, but a tip is to press f12 in your browser, do whatever you want to do, then right-click the relevant HTTP commands to "copy as powershell"
e.g. https://www.powershellbros.com/powershell-tip-of-the-week-create-invoke-webrequest-from-chrome/
e.g. https://www.powershellbros.com/powershell-tip-of-the-week-create-invoke-webrequest-from-chrome/