为什么我在尝试安装PSWindowsUpdate时收到此错误?我在所有新服务器上都收到此错误。
[root@salt ~]# salt 'Windows001' psget.install PSWindowsUpdate
Windows001:
ERROR: Issue executing powershell Install-Module -Name PSWindowsUpdate -Force | ConvertTo-Xml -Depth 2 -As "stream". Additional info follows:
retcode:
1
stderr:
Exception calling "ShouldContinue" with "2" argument(s): "Windows PowerShell is in NonInteractive mode. Read and
Prompt functionality is not available."
At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1\PSModule.psm1:7455 char:8
+ if($Force -or $psCmdlet.ShouldContinue($shouldContinueQueryMessag ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : PSInvalidOperationException
Install-Module : NuGet provider is required to interact with NuGet-based repositories. Please ensure that '2.8.5.201'
or newer version of NuGet provider is installed.
At line:1 char:1
+ Install-Module -Name PSWindowsUpdate -Force | ConvertTo-Xml -Depth 2 ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [Install-Module], InvalidOperationException
+ FullyQualifiedErrorId : CouldNotInstallNuGetProvider,Install-Module
stdout:
ERROR: Minions returned with non-zero exit code
2条答案
按热度按时间yhived7q1#
请确保已安装“2.8.5.201”或更新版本的NuGet提供程序。
7y4bm7vi2#
想通了,我不得不按照文档运行
psget.bootstrap
。