简体   繁体   中英

Powershell remote machine certificate notification

I am writing windows power shell script to connect the remote desktop machine. When execute below command in power shell am getting attached notification:

在此处输入图像描述

How can we handle this notification or default proceed with "Yes"?

cmdkey /generic:"xx.xxx.xxx.xxx" /user:"test" /pass:"pass" mstsc /v:xx.xxx.xxx.xxxx
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

You can delete these entries after connecting

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM