【问题标题】:Powershell remote machine certificate notificationPowershell 远程机器证书通知
【发布时间】:2021-08-25 08:45:26
【问题描述】:

我正在编写 windows power shell 脚本来连接远程桌面机器。在 power shell 中执行以下命令时,会收到附加通知:

我们如何处理此通知或默认继续“是”?

cmdkey /generic:"xx.xxx.xxx.xxx" /user:"test" /pass:"pass" mstsc /v:xx.xxx.xxx.xxxx

【问题讨论】:

标签: windows powershell powershell-2.0 powershell-3.0


【解决方案1】:
reg add "HKEY_CURRENT_USER\Software\Microsoft\Terminal Server Client" /v "AuthenticationLevelOverride" /t "REG_DWORD" /d 0 /f
reg add "HKEY_CURRENT_USER\Software\Microsoft\Terminal Server Client\LocalDevices" /v "<IP ADDRESS HERE>" /t "REG_DWORD" /d 13 /f

您可以在连接后删除这些条目

【讨论】:

    猜你喜欢
    • 2015-09-05
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-02-12
    • 2015-05-08
    • 2022-10-17
    • 2021-12-08
    • 2019-01-27
    相关资源
    最近更新 更多