0

Is there some service that needs to be running for netsh commands to work? When I run a command on one of my servers, eg.,

netsh firewall set service RemoteAdmin enable

The service has not been started.

or opening a port. They return with Ok or error 0, but have no effect. Does AV block remote netsh? netstat confirms that none of my commands are doing a thing.

Wanted to add: I am already logged in as Administrator.

Ideas?

Bubnoff

2
  • Are you running it as an admin or a regular user?
    – Chris
    Commented Dec 10, 2011 at 19:42
  • I am running in the administrator account
    – Bubnoff
    Commented Dec 10, 2011 at 19:45

1 Answer 1

2

netsh firewall requires the Windows Firewall service, SharedAccess, to be running.


To remotely enable Remote Desktop, you'll need to edit the registry:

reg add "HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server" /v "fDenyTSConnections" /t REG_DWORD /d 0

and reboot (shutdown -r -t 0). Afterwards, use qwinsta or netstat to verify.

6
  • Thanks -- RDP still doesn't show up in netstat but SharedAccess is running. 3389 right? I can't figure it out. I get 'Ok' but all RDP connections are refused and the port is not open in netstat output. My netsh commands show success but are ignored completely.
    – Bubnoff
    Commented Dec 10, 2011 at 22:24
  • As I already said, SharedAccess is the Windows Firewall service. It doesn't have anything to do with Remote Desktop. You probably just have RDP disabled if it doesn't show up. Can you run qwinsta and see if rdp-tcp is listed? Commented Dec 10, 2011 at 22:42
  • rdp-tcp is not listed. Is it possible to enable RDP with netsh? I've tried pretty much every combo out there and none have any effect. Tried with service remotedesktop and add portopening 3389 --- zilch. 3389 won't even show in netstat output.
    – Bubnoff
    Commented Dec 11, 2011 at 6:35
  • Once again, the firewall has nothing to do with whether a service is enabled. It only deals with allowing or blocking connections to an already-running service. ...How are you accessing the server right now? Do you have GUI access? Commented Dec 11, 2011 at 11:45
  • I have ssh access through cygwin. I need to enable rdp for a remote colleague who will be extracting data for a migration. To do this do I then need to alter the registry? Or I suppose I could try a remote installation of vnc, but rdp initially seemed easier. Thanks for your patient help! I also am remote by the way ...no gui for me or id just use computer properties.
    – Bubnoff
    Commented Dec 11, 2011 at 21:14

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .