#1
  1. No Profile Picture
    Super Moderator
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Jun 2009
    Location
    Hartford, WI
    Posts
    1,569
    Rep Power
    131

    Possible to start DHCP service remotely?


    I was updating some servers on one of my Windows boxes, and one server(Murmur) was running with DHCP Client. I had to stop DHCP to delete the file, so I wrote a .bat to stop the service, delete the file, then start the service. However, the script error'ed out with an 'Access is denied.', killing the .bat and not running the SC START Dhcp line. Now, does anyone know of a way to remotely access the server to be able to run the command and start the service?

    (Windows Server 2008 R2 SP1)
    He who knows not that he knows not is a fool, ignore him. He who knows that he knows not is ignorant, teach him. He who knows not that he knows is asleep, awaken him. He who knows that he knows is a leader, follow him.
  2. #2
  3. Backwards Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Mar 2007
    Location
    Washington, USA
    Posts
    16,922
    Rep Power
    9646
    Besides RDP? You can use PowerShell to connect and run the command.
    Code:
    > enter-pssession -computername whatever -credential domain\userwithadminrights
    [whatever] > sc.exe start dhcp
  4. #3
  5. No Profile Picture
    Super Moderator
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Jun 2009
    Location
    Hartford, WI
    Posts
    1,569
    Rep Power
    131
    Hmmm... Would that only work from a remote computer on the same network? The server is in a location with no human present atm, so it needs to be accessed from over the Internet.
    He who knows not that he knows not is a fool, ignore him. He who knows that he knows not is ignorant, teach him. He who knows not that he knows is asleep, awaken him. He who knows that he knows is a leader, follow him.
  6. #4
  7. Backwards Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Mar 2007
    Location
    Washington, USA
    Posts
    16,922
    Rep Power
    9646
    What are your options to connect? If you can't connect to it then, well, you can't connect to it. A reboot would work too, if you have power controls.
  8. #5
  9. No Profile Picture
    Super Moderator
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Jun 2009
    Location
    Hartford, WI
    Posts
    1,569
    Rep Power
    131
    A reboot is the simplest of answers. In my situation, I would need to use IP to target the location the system resides at. And since IP seems to be the only option, it seems it is not possible without the DHCP Client. I managed to contact someone who could restart it, and just have to wait a bit, so I be set, then.
    He who knows not that he knows not is a fool, ignore him. He who knows that he knows not is ignorant, teach him. He who knows not that he knows is asleep, awaken him. He who knows that he knows is a leader, follow him.

IMN logo majestic logo threadwatch logo seochat tools logo