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

Need help on powershell script for Login to a website

$
0
0

Hi All,

 

Using the below mentioned code I am logging into a Citrix URL, and from there launching an internet explorer application with a pre-loaded URL. I want to pass the credentials and login to the site launched from citrix.

Could anyone please guide me how can we create IE object for the new explorer launched from citrix.

 

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

$IE.visible = $true; 

$IE.navigate($url); 

$IE.Document.getElementById("username").value = $Username 

$IE.Document.getElementById("password").value=$Password

$IE.Document.getElementById("loginBtn").click()

while ($IE.Busy -eq $true)  

{ 

 Start-Sleep -Milliseconds 2000; 

 }

$IE.Document.getElementById("myapps-icon").click()

$IE.Quit()


Viewing all articles
Browse latest Browse all 6937

Trending Articles