On my Sony Viao pcg-811124 laptop with Windows 7, I disabled all non-Windows services through msconfig. When I restarted my laptop, it booted up, but I cannot view the screen, even in safe mode. I may have disabled a driver, but now I have no way of knowing which one.

So, not only do I not know which services I disable and need to enable, I can't seem to even enable the services I know that I have (for example, JungleDisk). When tried to restart it via the command line, I got prompted that I could not restart this service because it had been disabled.

How do I get my services enabled again?

migrated from serverfault.com Aug 12 '10 at 10:56

This question came from our site for system and network administrators.

up vote 30 down vote accepted

I believe the command you are looking for is:

sc config servicenamehere start= auto

You'll need to know the name of the service though - to view this from the command line, try this command - this will show all services:

sc query type= service state= all

If you want to see only stopped services, run this command:

sc query type= service state= inactive

The list of services output by the query can be quite long. You may filter it by using findstr (see post here) . For example

sc query type= service state= all | findstr "ssh"

Will select the output lines of the services list that contain the string "ssh"

Note: For some services you may need also administrator privileges, you will notice it on getting the message Access is denied after executing the sc command. In that case open the Command Prompt (Admin) by pressing 'Windows + X' keys.

  • 5
    NOTE: the space after the = is an essential part of the syntax. – Nathan Jun 12 '14 at 1:03
  • 1
    No it's not, at least not in Windows 10. – Droidzone Mar 16 '17 at 17:31

You can use PowerShell! (To start it, type powershell at a normal command prompt.)

The Get-Service cmdlet gets a list of services, which you can filter by any property. For example, this gets a list of disabled services:

Get-Service | ? {$_.StartType -eq 'Disabled'}

The Set-Service cmdlet can set several properties of a given service, including the startup type. For example, this sets the lanmanserver service to start automatically:

Set-Service 'lanmanserver' -StartupType Automatic

To make all currently disabled services start automatically, use this command:

Get-Service | ? {$_.StartType -eq 'Disabled'} | Set-Service -StartupType Automatic

Your Answer

 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.