라이선스 수락은 스크립트에 대해 지원되지 않습니다. 그러나 스크립트가 라이선스 동의가 필요한 모듈에 종속되는 시나리오는 지원됩니다.
PowerShellGet 스크립트 명령은 사용자가 라이선스를 본 것처럼 동작하는 매개 변수 AcceptLicense 를 지원합니다.
AcceptLicense를 지정하지 않으면 종속 모듈에 대한 파일이 표시 license.txt 되고 라이센스를 수락하라는 메시지가 표시됩니다.
예제
예제 1: 라이선스 동의가 필요한 종속성이 있는 스크립트 설치
스크립트 'ScriptRequireLicenseAcceptance'는 모듈 'ModuleRequireLicenseAcceptance'에 따라 다릅니다. 사용자에게 라이센스 동의 메시지가 표시됩니다.
PS> Install-Script -Name ScriptRequireLicenseAcceptance
License Acceptance
MIT License 2.0
Copyright (c) 2016 PowerShell Team
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software.
Do you accept the license terms for module 'ModuleRequireLicenseAcceptance'.
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "N"):
예제 2: 라이선스 수락 및 -AcceptLicense가 필요한 종속성이 있는 스크립트 설치
스크립트 'ScriptRequireLicenseAcceptance'는 모듈 'ModuleRequireLicenseAcceptance'에 따라 다릅니다. 지정된 -AcceptLicense 따라 사용자에게 라이센스를 수락하라는 메시지가 표시되지 않습니다.
PS> Install-Script -Name ScriptRequireLicenseAcceptance -AcceptLicense
자세한 정보
GitHub에서 Microsoft와 공동 작업
이 콘텐츠의 원본은 GitHub에서 찾을 수 있으며, 여기서 문제와 끌어오기 요청을 만들고 검토할 수도 있습니다. 자세한 내용은 참여자 가이드를 참조하세요.
PowerShell Gallery