Notitie
Voor toegang tot deze pagina is autorisatie vereist. U kunt proberen u aan te melden of de directory te wijzigen.
Voor toegang tot deze pagina is autorisatie vereist. U kunt proberen de mappen te wijzigen.
Licentieacceptatie wordt niet ondersteund voor scripts. Het scenario waarin een script afhankelijk is van een module waarvoor licentieacceptatie is vereist, wordt echter ondersteund.
De PowerShellGet-scriptopdrachten ondersteunen de parameter AcceptLicense die zich gedraagt alsof de gebruiker de licentie heeft gezien. Als AcceptLicense niet is opgegeven, krijgt de gebruiker het bestand voor de license.txt afhankelijke module te zien en wordt hem gevraagd de licentie te accepteren.
VOORBEELDEN
Voorbeeld 1: Script installeren met afhankelijkheden waarvoor licentieacceptatie is vereist
Het script 'ScriptRequireLicenseAcceptance' is afhankelijk van de module 'ModuleRequireLicenseAcceptance'. De gebruiker wordt gevraagd de licentie te accepteren.
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"):
Voorbeeld 2: Script installeren met afhankelijkheden waarvoor licentieacceptatie en -AcceptLicense
Het script 'ScriptRequireLicenseAcceptance' is afhankelijk van de module 'ModuleRequireLicenseAcceptance'. De gebruiker wordt niet gevraagd om de licentie te accepteren zoals -AcceptLicense is opgegeven.
PS> Install-Script -Name ScriptRequireLicenseAcceptance -AcceptLicense
Meer informatie
PowerShell Gallery