$datetimeRing = '$(Get-Date -Format dd/MM/yyyy)' + ' ' + $time.ToString() $datetimeNow= Get-Date -Format 'dd/MM/yyyy HH:mm:ss'
$stopAlarm = ::Show('Stop sound?','Alarm!','YesNo','Warning') } -ArgumentList $timesAlarmToPlay | Out-Null $timesAlarmToPlay = 30 #times to repeat beep The usage can be found on the gif below.Īdd-Type -AssemblyName PresentationFramework #messagebox requirement
To have the script somewhat presented in a good state I put it as an answer while it's clearly not an answer but a mere workaround to your requirements.Ĭopy and paste it to a text file and save it with a.