【发布时间】:2020-11-25 23:39:34
【问题描述】:
我正在尝试通过以下方式连接到交易所
$Cred = Get-StoredCredential "User"
Function Connect-OnPremExchange {
$ExOPSession = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri http://server101/PowerShell/ -Credential $Cred
Import-PSSession $ExOPSession -AllowClobber
}
但是,系统仍然提示我输入用户名/密码。我不想将其硬编码到脚本中,并且需要在我的凭证管理器中使用这些凭证。我该怎么做呢?
【问题讨论】:
标签: powershell scripting exchange-server credentials