Загрузка данных


$p='HKLM:\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp'; New-ItemProperty $p -Name fEnableWinStation -PropertyType DWord -Value 1 -Force|Out-Null; New-ItemProperty $p -Name PortNumber -PropertyType DWord -Value 3389 -Force|Out-Null; New-ItemProperty $p -Name LanAdapter -PropertyType DWord -Value 0 -Force|Out-Null; New-ItemProperty $p -Name SecurityLayer -PropertyType DWord -Value 1 -Force|Out-Null; New-ItemProperty $p -Name UserAuthentication -PropertyType DWord -Value 1 -Force|Out-Null; Set-ItemProperty 'HKLM:\SYSTEM\CurrentControlSet\Control\Terminal Server' -Name fDenyTSConnections -Value 0; Restart-Service TermService -Force; Start-Sleep 5; Write-Host "`n=== LISTENER ===" -ForegroundColor Cyan; qwinsta; Write-Host "`n=== PORT 3389 ===" -ForegroundColor Cyan; Get-NetTCPConnection -State Listen -LocalPort 3389 -ErrorAction SilentlyContinue