Home All Groups Group Topic Archive Search About

Remote 'net stop" possible?

Author
11 May 2005 4:53 PM
you know who maybe
Is it possible to use a workstation to send a "net stop" or (net start)
command to a Windows 2003 server?

I was hoping for something like this:

net \\ServerName stop "print spooler"

Author
11 May 2005 6:13 PM
Jerold Schulman
On Wed, 11 May 2005 09:53:01 -0700, "you know who maybe" <nguser2u@spamnotAOL.com> wrote:

>Is it possible to use a workstation to send a "net stop" or (net start)
>command to a Windows 2003 server?
>
>I was hoping for something like this:
>
>net \\ServerName stop "print spooler"
>


Use the SC.exe command, built into XP, W2k3, or installed from the W2k reskit.

C:\>sc
DESCRIPTION:
        SC is a command line program used for communicating with the
        NT Service Controller and services.
USAGE:
        sc <server> [command] [service name] <option1> <option2>...

        The option <server> has the form "\\ServerName"
        Further help on commands can be obtained by typing: "sc [command]"
        Commands:
          query-----------Queries the status for a service, or
                          enumerates the status for types of services.
          queryex---------Queries the extended status for a service, or
                          enumerates the status for types of services.
          start-----------Starts a service.
          pause-----------Sends a PAUSE control request to a service.
          interrogate-----Sends an INTERROGATE control request to a service.
          continue--------Sends a CONTINUE control request to a service.
          stop------------Sends a STOP request to a service.
          config----------Changes the configuration of a service (persistant).
          description-----Changes the description of a service.
          failure---------Changes the actions taken by a service upon failure.
          qc--------------Queries the configuration information for a service.
          qdescription----Queries the description for a service.
          qfailure--------Queries the actions taken by a service upon failure.
          delete----------Deletes a service (from the registry).
          create----------Creates a service. (adds it to the registry).
          control---------Sends a control to a service.
          sdshow----------Displays a service's security descriptor.
          sdset-----------Sets a service's security descriptor.
          GetDisplayName--Gets the DisplayName for a service.
          GetKeyName------Gets the ServiceKeyName for a service.
          EnumDepend------Enumerates Service Dependencies.

        The following commands don't require a service name:
        sc <server> <command> <option>
          boot------------(ok | bad) Indicates whether the last boot should
                          be saved as the last-known-good boot configuration
          Lock------------Locks the Service Database
          QueryLock-------Queries the LockStatus for the SCManager Database
Fix windows and pc errors, click for free system scan

Author
11 May 2005 6:29 PM
you know who maybe
Show quote Hide quote
"Jerold Schulman" <Je***@jsiinc.com> wrote in message
news:1ji481950uc1esqj7dq93ohi5i3nnj0rel@4ax.com...
> On Wed, 11 May 2005 09:53:01 -0700, "you know who maybe"
> <nguser2u@spamnotAOL.com> wrote:
>
>>Is it possible to use a workstation to send a "net stop" or (net start)
>>command to a Windows 2003 server?
>>
>>I was hoping for something like this:
>>
>>net \\ServerName stop "print spooler"
>>
>
>
> Use the SC.exe command, built into XP, W2k3, or installed from the W2k
> reskit.
>
Thanks Jerry!
Author
11 May 2005 6:38 PM
you know who maybe
Show quote Hide quote
"Jerold Schulman" <Je***@jsiinc.com> wrote in message
news:1ji481950uc1esqj7dq93ohi5i3nnj0rel@4ax.com...
> On Wed, 11 May 2005 09:53:01 -0700, "you know who maybe"
> <nguser2u@spamnotAOL.com> wrote:
>
>>Is it possible to use a workstation to send a "net stop" or (net start)
>>command to a Windows 2003 server?
>>
>>I was hoping for something like this:
>>
>>net \\ServerName stop "print spooler"
>>
>
>
> Use the SC.exe command, built into XP, W2k3, or installed from the W2k
> reskit.

I got it work on the Messenger service but I can't figure out how to make it
work with a service which has a space in the name.  I tried no space, single
quotes and double quotes, underscore.  I remember in NT we used to take out
the spaces for our bat files.
Author
12 May 2005 11:02 AM
Andrew Morton
> I got it work on the Messenger service but I can't figure out how to make
> it work with a service which has a space in the name.  I tried no space,
> single quotes and double quotes, underscore.  I remember in NT we used to
> take out the spaces for our bat files.

Go into the services mmc thing. Right-click on a service and choose
properties. Note the service name (often different from the display name).

Andrew
Author
12 May 2005 6:22 PM
you know who maybe
"Andrew Morton" <a**@in-press.co.uk.invalid> wrote in message
news:uA5VcJuVFHA.2984@tk2msftngp13.phx.gbl...
>> I got it work on the Messenger service but I can't figure out how to make
>> it work with a service which has a space in the name.  I tried no space,
>> single quotes and double quotes, underscore.  I remember in NT we used to
>> take out the spaces for our bat files.
>
> Go into the services mmc thing. Right-click on a service and choose
> properties. Note the service name (often different from the display name).
>
Great, thanks again!

Bookmark and Share