Set WMI property

Hi Nick,
This is what I use to enable remote desktop

(Get-WmiObject -Namespace "root\cimv2\TerminalServices" -Class Win32_TerminalServiceSetting -ComputerName XXXX).setallowtsconnections(1)

Or to be a bit more legible you could use

$computer = Get-WmiObject -Namespace "root\cimv2\TerminalServices" -Class Win32_TerminalServiceSetting -ComputerName XXXX
$computer.setallowtsconnections(1)