Friday, October 15, 2010

PowerShell | Load URL in the back

$IE=new-object -com internetexplorer.application
$IE.navigate2("http://ftduarte.blogspot.com/")
while ($oIE.busy)
{
#give some time for page to load
sleep -milliseconds 500 #or [System.Threading.Thread]::Sleep(500)
}
# $IE.visible=$true #optionally make browser appear
#TODO: stuff
$IE.Quit() #terminate COM object

No comments:

Post a Comment