出于某种原因,我安装的 Windows 10/Powershell 5.0 似乎缺少Certificate Provider。似乎我什至没有Microsoft.PowerShell.Security模块,该模块默认情况下应该与 powershell 一起安装并包含证书提供程序。这是我运行 Get-Module 时得到的结果(我之前添加了 post-git,也许我这样做时搞砸了?):
ModuleType Version Name ExportedCommands
---------- ------- ---- ----------------
Manifest 3.1.0.0 Microsoft.PowerShell.Management {Add-Computer, Add-Content, Checkpoint-Computer, Clear-Con...
Manifest 3.1.0.0 Microsoft.PowerShell.Utility {Add-Member, Add-Type, Clear-Variable, Compare-Object...}
Script 0.7.1 posh-git {Add-PoshGitToProfile, Add-SshKey, Enable-GitColors, Get-A...
Script 1.2 PSReadline {Get-PSReadlineKeyHandler, Get-PSReadlineOption, Remove-PS...
Run Code Online (Sandbox Code Playgroud)
这是我运行 Get-PSProvider 时得到的结果:
Name Capabilities Drives
---- ------------ ------
Registry ShouldProcess, Transactions {HKLM, HKCU}
Alias ShouldProcess {Alias}
Environment ShouldProcess {Env}
FileSystem Filter, ShouldProcess, Credentials {C, D, E}
Function ShouldProcess {Function} …Run Code Online (Sandbox Code Playgroud)