2011.01.18 14:03

PowerShell 를 이용한 IE Resfreshing

2초 간격 Resfreshing
$ie =New-Object -ComObject internetexplorer.application
$ie.Visible= $true
$infinity= [double]::Positiveinfinity
$ie.navigate("duck.pe.kr")
$starttime= Get-Date
$Error.Clear()
start-sleep -Seconds 2
for($i=1; $i -le $infinity; $i++)
{
$ie.Refresh()
$currenttime= get-date -Uformat %I:%M-%p
if ($i -eq 1) {Write-Host "Page refreshed $i time. Last Refresh time at $currenttime .. "}
else {Write-Host "Page refreshed $i times. Last Refresh time at $currenttime .. "}
if ($error[0] -ne $null)
{break}
Start-Sleep -Seconds 2}

1개의 IE 에서 띄워서 페이지 Refreshing
Trackback 0 Comment 1