execute 'Enable RDP' do
  command 'reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server" /v fDenyTSConnections /t REG_DWORD /d 0 /f'
end

execute 'Enable RDP firewall rule' do
  command 'netsh advfirewall firewall set rule group="Remote Desktop" new enable=Yes'
end

registry_key 'HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server' do
  values [{
    name: 'fDenyTSConnections',
    type: :dword,
    data: 0,  }]
end

execute 'Enable RDP firewall rule' do
  command 'netsh advfirewall firewall set rule group="Remote Desktop" new enable=Yes'
end

Use the registry resource instead of execute
Use the registry resource instead of execute

Signed-off-by: Tim Smith <764ef62106582a09ed09dfa0b6bff7c05fd7d1e4@chef.io>
