Created
June 20, 2012 06:48
-
-
Save fornext1119/2958482 to your computer and use it in GitHub Desktop.
PowerShell で Internet Explorer を 制御
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ie = New-Object -ComObject internetexplorer.application | |
$ie.Visible = $true | |
$ie.Toolbar = $true | |
$ie.MenuBar = $true | |
$ie.AddressBar = $true | |
$ie.StatusBar = $true | |
#ログオン画面 | |
$ie.Navigate('http://192.168.1.1/zzzz.asp') | |
while($ie.busy -or $ie.readystate -ne 4) | |
{ | |
Start-Sleep 1 | |
} | |
#ユーザID | |
$ie.document.getElementById("txtUserID").Value = "xxxxx" | |
#パスワード | |
$ie.document.getElementById("txtPassWD").Value = "yyyyy" | |
#ログオン | |
@($ie.Document.forms)[0].submit() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment