gpt4 book ai didi

windows - 如果组策略阻止 7zip,我该如何使用 Chocolatey?

转载 作者:可可西里 更新时间:2023-11-01 11:26:58 29 4
gpt4 key购买 nike

我尝试使用巧克力味,但似乎出于某种原因我的工作限制了它。有什么方法可以让它在公司工作场所正确安装吗?

这是我尝试安装 chocolatey 时的当前输出(提示被组策略阻止)

@powershell -NoProfile -ExecutionPolicy Bypass -Command "iex((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))" && SET PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin
Downloading https://chocolatey.org/api/v2/package/chocolatey/ to C:\Users\USER\AppData\Local\Temp\chocolatey\chocInstall\chocolatey.zip
Download 7Zip commandline tool
Downloading https://chocolatey.org/7za.exe to C:\Users\USER\AppData\Local\Temp\chocolatey\chocInstall\7za.exe
Extracting C:\Users\USER\AppData\Local\Temp\chocolatey\chocInstall\chocolatey.zip to C:\Users\USER\AppData\Local\Temp\chocolatey\chocInstall...
Start-Process : This command cannot be run due to the error: This program is blocked by group policy. For more information, contact your system administrator.
At line:66 char:1 + Start-Process "$7zaExe" -ArgumentList "x -o`"$tempDir`" -y `"$file`"" -Wait -NoN ...
+ CategoryInfo : InvalidOperation: (:) [Start-Process], InvalidOperationException
+ FullyQualifiedErrorId : InvalidOperationException,Microsoft.PowerShell.Commands.StartProcessCommand

Installing chocolatey on this machine & : The term 'C:\Users\USER\AppData\Local\Temp\chocolatey\chocInstall\tools\chocolateyInstall.ps1' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:77 char:3 + & $chocInstallPS1
+ CategoryInfo : ObjectNotFound: (C:\Users\USER...ateyInstall.ps1:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException

最佳答案

对于系统管理员来说,Chocolatey 对公司非常友好。您设置自己的自定义服务器并创建内部包,访问内部资源。您禁用默认来源 (chocolatey.org)。现在有很多公司在这样做。

Chocolatey.org(又名社区供稿)可能对企业不友好。

对于不在 ops 的人,你应该看看你的系统管理员有兴趣允许什么。从您的帖子来看,他们似乎不喜欢使用 7zip。然而,这不是必需的。查看 Puppet 提供程序 - https://forge.puppetlabs.com/chocolatey/chocolatey#use-an-internal-chocolateynupkg-for-chocolatey-installationhttps://github.com/chocolatey/choco/wiki/Installation 的替代安装方法.

关于windows - 如果组策略阻止 7zip,我该如何使用 Chocolatey?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32990421/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com