Powershell에서 remotesigned 권한으로 스크립트 돌리기
Powershell.exe -executionpolicy remotesigned -File %FILE_BEAT_DIRECTORY%install-service-filebeat.ps1
자세한 권한은 https://talsu.net/?p=834 참고하자
Powershell에서 command돌리기
Powershell.exe -Command "& {Start-Service filebeat}"
Sample (Filebeat 서비스 세팅하고 돌리는 스크립트)
set FILE_BEAT_DIRECTORY=/*Directory*/
Powershell.exe -executionpolicy remotesigned -File %FILE_BEAT_DIRECTORY%install-service-filebeat.ps1
Powershell.exe -Command "& {Start-Service filebeat}"
'개발 > Script - Batch & Powershell' 카테고리의 다른 글
Powershell 서비스 관련 명령어 (0) | 2020.12.18 |
---|---|
Powershell ExecutionPolicy Detail (0) | 2020.12.18 |