Powershell 에서 스 크 립 트 해결 방법 실행 금지

Powershell 을 처음 사용 할 때 관리 모듈 이나 다른 작업 을 가 져 올 때 이 시스템 에서 스 크 립 트 실행 이 금지 되 어 있 기 때문에 오류 내용 은 다음 과 같 습 니 다.

Windows PowerShell
(C) 2009 Microsoft Corporation。 。

PS C:\Windows\system32> D:\Workshop\Powershell\Sprinkler\src\Scripts\SPRINKLE.ps1
D:\Workshop\Powershell\Sprinkler\src\Scripts\SPRINKLE.ps1, 。 ,
"get-help about_signing"
:1 : 58
+ D:\Workshop\Powershell\Sprinkler\src\Scripts\SPRINKLE.ps1 <<<<
+ CategoryInfo : NotSpecified: (:) [], PSSecurityException
+ FullyQualifiedErrorId : RuntimeException

PS C:\Windows\system32> get-ExecutionPolicy  Restricted
역시 제한 이 야.아니면"get-help about"signing"설정 명령 을 찾 을 수 있 습 니 다"set-executionpolicy"  도움말 에서"set-executionpolicy"의 설명 을 찾 습 니 다.최소한 신뢰 할 수 있 는 것 으로 표시 되 는 것 을 권장 하 는 것 같 습 니 다.
-- RemoteSigned: Requires that all scripts and configuration files downloaded from the Internet be signed by a trusted publisher.  PowerShell 로 다음 을 실행 합 니 다:  PS C:\Windows\system32> set-ExecutionPolicy RemoteSigned
정책 변경 실행  정책 을 실행 하면 신뢰 하지 않 는 스 크 립 트 를 실행 하 는 것 을 방지 할 수 있 습 니 다.실행 정책 을 변경 하면 aboutExecution_Policies  주제 에서 말 한 안전 위험 을 돕다.실행 정책 을 변경 하 시 겠 습 니까?  [Y]네(Y)  [N]아니오(N)  [S]연결(S)  [?] 도움말(기본 값"Y"):y  PS C:\Windows\system32>

좋은 웹페이지 즐겨찾기