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

Getting Content from a site after login

$
0
0

so i got powershell to launch my webpage, enter the username and password and then the site redirects to an url that uses sids after the url

 

How do i get powershell to grab the content after login

$Date = (Get-Date -format "yyyyMMdd")

 

$url = "https://iportalverizon.billmatrix.com/VerizonPortal/Login.aspx" 

$username="*" 

$password="*" 

 

 

$ie = New-Object -com internetexplorer.application; 

$ie.visible = $true; 

$ie.navigate($url);

 

 

while ($ie.Busy -eq $true) 

    Start-Sleep -Milliseconds 1000; 

$ie.Document.getElementById("_ctl0_authentication_UserName").value = $username 

$ie.Document.getElementByID("_ctl0_authentication_Password").value=$password 

 

Import-Module WASP

$ie = Select-Window IEXPLORE | Set-WindowActive

$ie | Send-Keys "{TAB}"

$ie | Send-Keys "{TAB}"

$ie | Send-Keys "{TAB}"

$ie | Send-Keys "{TAB}"

$ie | Send-Keys "{TAB}"

$ie | Send-Keys "{TAB}"

$ie | Send-Keys "{TAB}"

$ie | Send-Keys "{ENTER}"


Viewing all articles
Browse latest Browse all 6937

Trending Articles