You can enable or disable Remote Desktop centrally through Group Policy settings. Identify whether Group Policy is blocking RDP Check out this article to learn more about return codes and their descriptions. The output of the command should be either 0 (started) or 10 (already running).
For testing purposes, you can disable Windows Firewall on the remote computer with this command: Invoke-Command -ComputerName Win7 -ScriptBlock