How to provide Login using Windows Security Browser Popup using Powershell

This topic contains 1 reply, has 2 voices, and was last updated by Profile photo of Don Jones Don Jones 6 months ago.

  • Author
    Posts
  • #41396
    Profile photo of Amar Helloween
    Amar Helloween
    Participant

    Hi All,

    My requirement includes opening an URL -> it will ask for credentials ( Windows security popup ) -> Provide credentials and it should login.

    I am able to connect to the URL using powershell but not able to give the credentials in the Windows Security popup. I dont want to use VBScript(Send keys). Please help me out with any solution using Powershell itself.

    I searched the whole google, didn't got a solution. Friends need all your expertise help here.

  • #41401
    Profile photo of Don Jones
    Don Jones
    Keymaster

    PowerShell doesn't have an equivalent to SendKeys, and isn't really designed for GUI automation. PowerShell also isn't a web browser; sites that are intended only for interaction with a web browser aren't going to be easy to automate.

    You'll need to learn a bit about HTTP (which is beyond what this forum is about). It's possible that the web page you're attempting to access is sending an HTTP auth request. The browser handles that by displaying the dialog; in PowerShell, you could just send the HTTP auth response instead of using a dialog. But I don't want to imply that this is simple; you're basically re-building part of what a web browser is and does. It's potentially complex, and PowerShell might not be the best language for it.

You must be logged in to reply to this topic.