Tuesday, November 28, 2017

 

[ActiveDirectory] powershell 실행 오류, digitally signed



powershell 실행 오류, digitally signed




[Explanation]
파워쉘 스크립트를 GPO 정책에 설정하여 적용하였는데 Client PC에서 반영이 되지 않았다. 확인해보니 정책은 정상적으로 적용되었지만 스크립트가 아래와 같은 메시지로 실행하지 않은 것이다. 
"<script>.ps1파일을 로드할 수 없습니다. <script>.ps1 파일에 디지털 서명하지 않았습니다. 스크립트가 시스템에서 실행되지 않습니다."
“<script>.ps1 is not digitally signed.  The script will not execute on the system.” 
초기 ps1 파일에서는 'Set-ExecutionPolicy Unrestricted'으로 스크립트를 실행하도록 하였지만, 구글링해본 결과, 'Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass'로 설정해야 한다고 한다. 그래서 수정하여 실행을 하니 정상적으로 적용이 되었다. 자세한 정보는 링크를 참고하면 된다. 
ExecutionPolicy 관련 parameter.
Specifies the new execution policy. The acceptable values for this parameter are:
  • Restricted. Does not load configuration files or run scripts. Restricted is the default execution policy.
  • AllSigned. Requires that all scripts and configuration files be signed by a trusted publisher, including scripts that you write on the local computer.
  • RemoteSigned. Requires that all scripts and configuration files downloaded from the Internet be signed by a trusted publisher.
  • Unrestricted. Loads all configuration files and runs all scripts. If you run an unsigned script that was downloaded from the Internet, you are prompted for permission before it runs.
  • Bypass. Nothing is blocked and there are no warnings or prompts.
  • Undefined. Removes the currently assigned execution policy from the current scope. This parameter will not remove an execution policy that is set in a Group Policy scope. 







댓글이나 의견은 언제든지 환영합니다.

Your Comments are Always Welcome!
Share:

0 comments:

Post a Comment