PowerShell Timer with Alarm
Function Start-Timer { param( [Parameter(Mandatory=$true)] [int]$seconds, [Parameter(Mandatory=$false)] [switch]$alarm ) $a = $(Get-Date) For($i=1;$i -le $seconds;$i++){ Write-Progress -Activity "$seconds Second Timer" -Status $i -PercentComplete $(($i/$seconds)*100) -id 1 Start-Sleep -Seconds 1 } if($alarm){ For($i=1;$i -le 10;$i++){ [console]::beep(500,300) } } }
Make Your Computer Talk
Add-Type -AssemblyName System.Speech $Speech = New-Object System.Speech.Synthesis.SpeechSynthesizer $Speech.Speak("I'm sorry Dave, I'm afraid I can't do that")