Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources
Viewing all articles
Browse latest Browse all 6937

How to enter password in the Sharepoint Login Popup

$
0
0

Hi,

I am trying to automate the login for SharePoint currently. This is my code -

$pwd = Read-Host 'Enter password' -AsSecureString #gets password from user
Start-Sleep -Milliseconds 1000

$ie = New-Object -ComObject InternetExplorer.Application
$ie.Navigate2("URL")
$ie.Visible = $true

This will open the browser with the respective "URL". After this the login popup comes up. The username is by default present in the popup. Now how to populate the Password textbox in the popup with $pwd and click on OK button.

PFB, the screenshot of the browser and popup for reference.


Viewing all articles
Browse latest Browse all 6937

Trending Articles