2024의 게시물 표시

화면보호기 방지용 powershell script

이미지
스크립트 다운로드 :  구글드라이브(다운로드)  1. 전체 소스 #Clears the display in the host program. Clear-Host  #Equivalent command of "Echo" for powershell Write-Output "starting key input macro" #Make Object related to windows shortcut $WShell = New-Object -com "Wscript.Shell" while($true) {     #Press scrolllock key     $WShell.sendkeys("{SCROLLLOCK}")          #Press scrolllock key again for rollback     Start-Sleep -Milliseconds 100     $WShell.sendkeys("{SCROLLLOCK}")     Write-Output "activated at $((Get-Date).ToString("HH:mm:ss"))"     Start-Sleep -Seconds 300 } *참고 : WScript COM 오브젝트 설명  출처 : https://www.reddit.com/r/PowerShell/comments/mdykzz/what_does_newobject_comobject_wscriptshell_do/?rdt=65324