从PowerShell访问Windows凭据管理器
发布时间:2020-12-13 20:46:57 所属栏目:Windows 来源:网络整理
导读:我在Windows Server 2008 R2上使用PowerShell 2.0(因SP2010而必需).我需要从Windows Credential Manager检索进程的凭据.我似乎无法使其发挥作用. 我得到了这段代码: [Windows.Security.Credentials.PasswordVault,Windows.Security.Credentials,ContentType
我在Windows Server 2008 R2上使用PowerShell 2.0(因SP2010而必需).我需要从Windows Credential Manager检索进程的凭据.我似乎无法使其发挥作用.
我得到了这段代码: [Windows.Security.Credentials.PasswordVault,Windows.Security.Credentials,ContentType=WindowsRuntime] (new-object Windows.Security.Credentials.PasswordVault).RetrieveAll() | % { $_.RetrievePassword(); $_ } 这两行代码都会抛出错误 Windows.Security.Credentials.PasswordVault,ContentType=WindowsRuntime : Unable to find type [Windows.Security.Credentials.PasswordVault,ContentType=WindowsRuntime]: make sure that the assembly containing this type is loaded. 和 (new-object Windows.Security.Credentials.PasswordVault).RetrieveAll() | % {$_.RetrievePassword(); $_ } 分别.我一直试图以某种方式导入PasswordVault类.到目前为止谷歌已经让我失望了,我甚至都没能找到它所在的大会.我错过了什么?
在powershell5类型中:
Install-Module CredentialManager -force 然后 New-StoredCredential -Target $url -Username $ENV:Username -Pass .... 然后 Get-StoredCredential -Target .... (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
相关内容
- windows – 外部/内部解析的DNS配置
- 使用Windows C API创建任意大小的文件
- Windows批处理脚本解压缩目录中的文件
- windows-phone-7 – 从导航堆栈中删除一个页面
- windows 安装 MySQL
- windows-server-2003 – 即使在明确同步时间之后,Windows S
- Windows 8 – Windows 8 Store Apps和Windows Phone Apps之
- 更改windows phone 7 silverlight项目命名空间导致启动失败
- windows – 如何监控硬盘是否处于待机状态?
- windows – 将特定列从一个文本文件复制到另一个文本文件
推荐文章
站长推荐
- 简单安装windows terminal和在window10开启Ubunt
- windows-server-2008 – “SC.EXE config”和美元
- windows – 从批处理文件运行rake
- windows-server-2008 – 阻止Java向所有终端服务
- 存储区域网络 – 什么使云存储(亚马逊AWS,Micros
- Caused by com microsoft sqlserver jdbc SQLSer
- 运行Windows应用程序的实时操作系统替代品?
- 识别/指纹Windows Server核心安装与完整
- 如何在64位Windows计算机上安装rJava与64位R一起
- 如何通过名称引用Windows窗体控件(C#/ VB)
热点阅读