当我通过WinRM连接到新的Windows机器时,我无法访问CredentialManager的PasswordVault。
[Windows.Security.Credentials.PasswordVault,Windows.Security.Credentials,ContentType=WindowsRuntime]
$vault = New-Object Windows.Security.Credentials.PasswordVault
$vault.RetrieveAll()
,错误信息为:
Exception calling "RetrieveAll" with "0" argument(s): "Access is denied.
Cannot open Vault"
当我使用Desktop或RDP登录计算机时,似乎神奇地创建了PasswordVault,并且通过WinRM进行访问也可以。
有解决方案吗?也许我可以用命令初始化PasswordVault?