Windows Powershell 권한변경

 

Windows Powershell 권한변경

 

Powershell에서 스크립트 실행이 안될 때

. : 이 시스템에서 스크립트를 실행할 수 없으므로 C:\Program Files (x86)\VMware\Infrastructure\vSphere PowerCLI\Scripts\I

nitialize-PowerCLIEnvironment.ps1 파일을 로드할 수 없습니다. 자세한 내용은 http://go.microsoft.com/fwlink/?LinkID=135170의 about_Execution_Policies를 참조하십시오.

위치 줄:1 문자:3

+ . “C:\Program Files (x86)\VMware\Infrastructure\vSphere PowerCLI\Scri …

+   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    + CategoryInfo          : 보안 오류: (:) [], PSSecurityException

    + FullyQualifiedErrorId : UnauthorizedAccess

PS C:\Windows\system32>

 

변경방법

※관리자권한으로 파워쉘 실행.

Microsoft Windows [Version 10.0.10240]

(c) 2015 Microsoft Corporation. All rights reserved.

C:\Windows\system32>powershell

Windows PowerShell

Copyright (C) 2015 Microsoft Corporation. All rights reserved.

PS C:\Windows\system32> ExecutionPolicy      <– 현재상태확인

Restricted        <—- 모든 스크립트 막음

PS C:\Windows\system32>

PS C:\Windows\system32> Set-ExecutionPolicy Unrestricted

PS C:\Windows\system32>

PS C:\Windows\system32> ExecutionPolicy       <– 다시 확인

Unrestricted     <—- 모든 스크립트 허용으로 바뀐거 확인 됨.

PS C:\Windows\system32>

 

소셜 미디어로 공유하기

You may also like...

답글 남기기

이메일 주소는 공개되지 않습니다. 필수 필드는 *로 표시됩니다

This site uses Akismet to reduce spam. Learn how your comment data is processed.