Betikler için lisans kabulü gerektirme
Lisans Kabulü betikler için desteklenmez. Ancak, bir betiğin lisans kabulü gerektiren bir modüle bağımlı olduğu senaryo desteklenir.
PowerShellGet betik komutları, kullanıcı lisansı görmüş gibi davranan AcceptLicense parametresini destekler. AcceptLicense belirtilmezse kullanıcıya bağımlı modülün license.txt
dosyası gösterilir ve lisansı kabul etmek isteyip istemediğiniz sorulur.
ÖRNEKLER
Örnek 1: Lisans kabulü gerektiren bağımlılıklarla Betik Yükleme
'ScriptRequireLicenseAcceptance' betiği 'ModuleRequireLicenseAcceptance' modülüne bağlıdır. Kullanıcıdan Lisansı Kabul Etmek isteyip istemediğiniz sorulur.
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"):
Örnek 2: Lisans kabulü ve -AcceptLicense gerektiren bağımlılıklarla Betik yükleme
'ScriptRequireLicenseAcceptance' betiği 'ModuleRequireLicenseAcceptance' modülüne bağlıdır. -AcceptLicense belirtildiğinden kullanıcıdan lisansı kabul etmek isteyip istemediğiniz sorulmuyor.
PS> Install-Script -Name ScriptRequireLicenseAcceptance -AcceptLicense
Daha fazla ayrıntı’yı seçin
PowerShell Gallery
Geri Bildirim
https://aka.ms/ContentUserFeedback.
Çok yakında: 2024 boyunca, içerik için geri bildirim mekanizması olarak GitHub Sorunları’nı kullanımdan kaldıracak ve yeni bir geri bildirim sistemiyle değiştireceğiz. Daha fazla bilgi için bkz.Gönderin ve geri bildirimi görüntüleyin