Posts Tagged ‘InternetExplorer.Application’

JavaScript in PowerShell

May 1, 2011

$o=new-object -com internetexplorer.application
$o.navigate2(“about:blank”)
$o.visible=$true
$c=”<script>alert(“”Powershell””)</script>”
$o.Document.IHtmlDocument2_Write($c)

Change quotes

Advertisements

Search in Google with PowerShell

April 24, 2011

$IE= new-object -com InternetExplorer.Application
$IE.navigate2(“http://www.google.es&#8221;)
while ($IE.busy) {
sleep -milliseconds 50
}
$IE.visible=$true
$IE.Document.getElementById(“q”).value=”PowerShell”
$IE.Document.getElementById(“f”).submit()