Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $ie = New-Object -ComObject 'internetExplorer.Application'
- $ie.Visible= $true
- $username="username@domain.com"
- $password="password"
- $ie.Navigate("https://www.yourwebsite.com")
- While ($ie.Busy -eq $true)
- {
- Start-Sleep -Seconds 3
- }
- $usernamefield = $ie.document.getElementByID('Email_ID').value="$username"
- $passwordfield = $ie.document.getElementByID('Password').value="$password"
- $Link = $ie.document.getElementByID('Login_ID')
- $Link.click() #or $Link.submit()
- $ie.Quit()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement