Rechercher dans ce blog

mercredi 6 juillet 2022

Maintenir l'écran allumé - mode télétravail

 Il faudra faire un changement de valeur $Push si trop long (en secondes)



$wshell = New-Object -ComObject wscript.shell


[int]$Push = 300

Do

{

    $wshell.SendKeys('^')

    Write-Host "$(Get-Date) : Push CTRL"

    

    start-sleep $Push

    #Write-host  "$([int]$Push - [Int]$i )"


} While ($p -ne 'n') 

Aucun commentaire: