상세 컨텐츠

본문 제목

윈도우서버 특정 프로그램 실행시간 감지 및 종료

윈도우(winodw)

by kth9364 2024. 9. 4. 15:12

본문

bat 파일이름 : starting_and_cycle.bat

#이하 내용

@echo off

:1

Powershell.exe -executionpolicy remotesigned -File  C:\Desktop\check_and_kill.ps1

 

#초 단위
timeout -t 30 /nobreak

goto 1

 

 

파워쉘 파일이름: check_and_kill.ps1

 

Get-Process hwp, AcroRd32, POWERPNT, EXCEL, HwpPrnMng | 

#분 단위
Where StartTime -lt (Get-Date).AddMinutes(-5) | 
Stop-Process -Force

'윈도우(winodw)' 카테고리의 다른 글

윈도우 서버 모델명 확인  (0) 2025.02.20
Internet Explorer 강제 실행  (0) 2025.01.13

관련글 더보기