- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我关注 Get Started with the PowerShell Gallery这表明 PowerShellGet 模块存在于 Windows 10(我正在使用 - build 14721)中。为了确认,我正在运行 PowerShell v5:
>$PSVersionTable
Name Value
---- -----
PSVersion 5.0.14271.1000
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.14271.1000
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
PowerShellGet also requires the NuGet provider to work with the PowerShell Gallery. You will be prompted to install the NuGet provider automatically upon first use of PowerShellGet if the NuGet provider is not in one of the following locations: •$env:ProgramFiles\PackageManagement\ProviderAssemblies
•$env:LOCALAPPDATA\PackageManagement\ProviderAssemblies
>ls $env:LOCALAPPDATA\PackageManagement\ProviderAssemblies
>ls $env:ProgramFiles\PackageManagement\ProviderAssemblies
ls : Cannot find path 'C:\Program Files\PackageManagement\ProviderAssemblies' because it does not exist.
At line:1 char:1
+ ls $env:ProgramFiles\PackageManagement\ProviderAssemblies
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (C:\Program File...viderAssemblies:String) [Get-ChildItem], ItemNotFoundException
+ FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.GetChildItemCommand
Or, you can run Install-PackageProvider -Name NuGet -Force to automate the download and installation of the NuGet provider.
>Install-PackageProvider -Name NuGet -Force
Install-PackageProvider : The term 'Install-PackageProvider' is not recognized as the name of a cmdlet, function, script file, or operable program.
correct and try again.
At line:1 char:1
+ Install-PackageProvider -Name NuGet -Force
+ ~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (Install-PackageProvider:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
最佳答案
直到 PowerShell 5.1 才引入“Install-PackageProvider”
关于powershell - Install-PackageProvider 未被识别为 cmdlet、函数、脚本文件或可运行程序的名称,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35818432/
我关注 Get Started with the PowerShell Gallery这表明 PowerShellGet 模块存在于 Windows 10(我正在使用 - build 14721)中。
我在 Octopus Deploy 中运行了以下 Powershell 脚本。 但是,如果它们尚未安装,我只希望它们安装。 我安装了它们,最好它也只会在它们低于某个版本时安装它们。 有人可以建议什么被
我是一名优秀的程序员,十分优秀!