fix: корректный .Count при одном RDP-сертификате в store
PowerShell 5.1 разворачивал одноэлементные коллекции cert и ломал диагностику. Добавлены самотест и обновлён README (-IncludeAdminTests, обход GPO). Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -67,10 +67,15 @@ Assert-Test 'Initialize-RdpRepairDataRoot returns path' {
|
||||
}
|
||||
|
||||
Assert-Test 'Get-RdpRepairComputerDnsNames non-empty' {
|
||||
$n = Get-RdpRepairComputerDnsNames
|
||||
$n = @(Get-RdpRepairComputerDnsNames)
|
||||
if ($n.Count -lt 1) { throw 'no dns names' }
|
||||
}
|
||||
|
||||
Assert-Test 'Get-RdpRepairRemoteDesktopCertificates exposes Count' {
|
||||
$certs = @(Get-RdpRepairRemoteDesktopCertificates)
|
||||
$null = $certs.Count
|
||||
}
|
||||
|
||||
Assert-Test 'Get-RdpRepairDiagnosticSnapshot object shape' {
|
||||
if (-not (Test-RdpRepairIsAdministrator)) {
|
||||
Write-Host ' (skip snapshot fields - not admin)' -ForegroundColor DarkYellow
|
||||
|
||||
Reference in New Issue
Block a user