1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
# File 'manifests/windows/enable_rdp.pp', line 1
class classroom_legacy::windows::enable_rdp {
assert_private('This class should not be called directly')
registry_value { 'hklm\System\CurrentControlSet\Control\Terminal Server\fDenyTSConnections':
ensure => present,
type => 'dword',
data => '0',
}
registry_value { 'hklm\System\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp\UserAuthentication':
ensure => present,
type => 'dword',
data => '1',
}
exec { 'Enable RDP firewall rule':
command => 'Enable-NetFirewallRule -DisplayGroup "Remote Desktop"',
onlyif => 'if (((New-Object -ComObject hnetcfg.fwpolicy2).rules | Where-Object {$_.Name -like "Remote Desktop*User*TCP*"}).enabled) { exit 1 } else { exit 0 }',
provider => 'powershell',
}
}
|