Sc.exe also displays service status and retrieves the values stored in the status structure fields.You can set the parameters to these functions by specifying them on the command line.The tool also lets you specify the name of a remote computer so that you can call the service API functions or view the service status structures on the remote computer.
To know the status of particular service
Go to Run ---> cmd ------> sc query "SERVICE NAME "
C:\Users\Trainer>sc query "IISADMIN"
SERVICE_NAME: IISADMIN
TYPE : 20 WIN32_SHARE_PROCESS
STATE : 1 STOPPED
WIN32_EXIT_CODE : 1066 (0x42a)
SERVICE_EXIT_CODE : -2146893818 (0x80090006)
CHECKPOINT : 0x0
WAIT_HINT : 0x0
C:\Users\Trainer>hostname
Trainer-PC
C:\Users\Trainer>date /t && time /t
Wed 04/01/2015
02:16 PM
C:\Users\Trainer>
sc query
sc query type= service state= all
To create a list of active drivers, use
sc query type= driver
Or for a list of everything, use
sc query state= all
How to Use ?
Open cmd and type
sc query
Some more ways to use SC command.
sc config
This command is used to determine the status of a service at system startup. A service can be set to run automatically, manually or not at all.
sc config ServiceName start= flag
Here ServiceName is the name of the service and flag has one of the values auto, demand. or disabled .
sc config ServiceName start= demand
Note that there must be a space after the equals sign.
If you want to Know the status of services on Remote then type
sc \\server_name query
To know the status of particular service
Go to Run ---> cmd ------> sc query "SERVICE NAME "
C:\Users\Trainer>sc query "IISADMIN"
SERVICE_NAME: IISADMIN
TYPE : 20 WIN32_SHARE_PROCESS
STATE : 1 STOPPED
WIN32_EXIT_CODE : 1066 (0x42a)
SERVICE_EXIT_CODE : -2146893818 (0x80090006)
CHECKPOINT : 0x0
WAIT_HINT : 0x0
C:\Users\Trainer>hostname
Trainer-PC
C:\Users\Trainer>date /t && time /t
Wed 04/01/2015
02:16 PM
C:\Users\Trainer>
sc query
sc query type= service state= all
To create a list of active drivers, use
sc query type= driver
Or for a list of everything, use
sc query state= all
How to Use ?
Open cmd and type
sc query
Open cmd and type
sc query
Some more ways to use SC command.
sc config
This command is used to determine the status of a service at system startup. A service can be set to run automatically, manually or not at all.
sc config ServiceName start= flag
Here ServiceName is the name of the service and flag has one of the values auto, demand. or disabled .
sc config ServiceName start= demand
Note that there must be a space after the equals sign.
If you want to Know the status of services on Remote then type
sc \\server_name query
No comments:
Post a Comment