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


Set-ItemProperty 'HKLM:\SYSTEM\CurrentControlSet\Control\Terminal Server' -Name fDenyTSConnections -Value 0; Set-ItemProperty 'HKLM:\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp' -Name UserAuthentication -Value 1; Set-Service TermService -StartupType Automatic; Start-Service TermService; if (-not (Get-NetFirewallRule -DisplayName 'RDP TCP 3389' -ErrorAction SilentlyContinue)) { New-NetFirewallRule -DisplayName 'RDP TCP 3389' -Direction Inbound -Action Allow -Protocol TCP -LocalPort 3389 -Profile Any | Out-Null }; if (-not (Get-NetFirewallRule -DisplayName 'RDP UDP 3389' -ErrorAction SilentlyContinue)) { New-NetFirewallRule -DisplayName 'RDP UDP 3389' -Direction Inbound -Action Allow -Protocol UDP -LocalPort 3389 -Profile Any | Out-Null }; Get-Service TermService; Get-NetTCPConnection -LocalPort 3389 -State Listen -ErrorAction SilentlyContinue