Simple Count Up Loop

C:\Windows\System32\WindowsPowerShell\v1.0\PowerShell_ise.exe

# Time to run
param($minutes = 920)

# Loop
$myshell = New-Object -com "Wscript.Shell"
for ($i = 0; $i -lt $minutes; $i++) {
    $myshell.sendkeys("{SCROLLLOCK}")
    Start-Sleep -Milliseconds 100
    $myshell.sendkeys("{SCROLLLOCK}")
    Echo $I
    Start-Sleep -Seconds 60
}


Leave a Reply

Your email address will not be published. Required fields are marked *