fix: корректный .Count при одном RDP-сертификате в store

PowerShell 5.1 разворачивал одноэлементные коллекции cert и ломал диагностику.
Добавлены самотест и обновлён README (-IncludeAdminTests, обход GPO).

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
PTah
2026-06-12 20:25:00 +10:00
parent 14348a0181
commit 60b843b936
4 changed files with 19 additions and 7 deletions
+1 -1
View File
@@ -66,7 +66,7 @@ try {
if ($RestoreTls) {
Write-RdpRepairLog 'Возврат SecurityLayer=2 (TLS)' 'STEP' $logPath
$certs = Get-RdpRepairRemoteDesktopCertificates
$certs = @(Get-RdpRepairRemoteDesktopCertificates)
if ($certs.Count -eq 0) {
Write-RdpRepairLog 'No cert in Remote Desktop store - run full repair or repair install first' 'ERROR' $logPath
exit 2