- Start-Service
- Syntax
- Description
- Examples
- Example 1: Start a service by using its name
- Example 2: Display information without starting a service
- Example 3: Start a service and record the action in a text file
- Example 4: Start a disabled service
- Parameters
- Inputs
- Outputs
- Notes
- Start or stop Windows service from command line (CMD)
- How to open Windows Services Manager in Windows 10
- How to open Windows Services Manager
- Types of Windows Services startup
- Start, stop, disable Windows Services
- Manage Services using Command Line
- How to Start or Stop a Service in Windows 10/8/7
- How to start, stop, or disable a service in Services.MSC
- How to Start, Stop or Restart Services in Task Manager
- How to Start or Disable a Service in Registry Editor
Start-Service
Starts one or more stopped services.
Syntax
Description
The Start-Service cmdlet sends a start message to the Windows Service Controller for each of the specified services. If a service is already running, the message is ignored without error. You can specify the services by their service names or display names, or you can use the InputObject parameter to supply a service object that represents the services that you want to start.
Examples
Example 1: Start a service by using its name
This example starts the EventLog service on the local computer. The Name parameter identifies the service by its service name.
Example 2: Display information without starting a service
This example shows what would occur if you started the services that have a display name that includes «remote».
The DisplayName parameter identifies the services by their display name instead of their service name. The WhatIf parameter causes the cmdlet to display what would happen when you run the command but does not make changes.
Example 3: Start a service and record the action in a text file
This example starts the Windows Management Instrumentation (WMI) service on the computer and adds a record of the action to the services.txt file.
First we use Get-Service to get an object that represent the WMI service and store it in the $s variable. Next, we start the service. Without the PassThru parameter, Start-Service does not create any output. The pipeline operator (|) passes the object output by Start-Service to the Format-List cmdlet to format the object as a list of its properties. The append redirection operator (>>) redirects the output to the services.txt file. The output is added to the end of the existing file.
Example 4: Start a disabled service
This example shows how to start a service when the start type of the service is Disabled.
The first attempt to start the Telnet service (tlntsvr) fails. The Get-CimInstance command shows that the StartMode property of the Tlntsvr service is Disabled. The Set-Service cmdlet changes the start type to Manual. Now, we can resubmit the Start-Service command. This time, the command succeeds. To verify that the command succeeded, run Get-Service .
Parameters
Prompts you for confirmation before running the cmdlet.
Type: | SwitchParameter |
Aliases: | cf |
Position: | Named |
Default value: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Specifies the display names of the services to start. Wildcard characters are permitted.
Type: | String [ ] |
Position: | Named |
Default value: | None |
Accept pipeline input: | False |
Accept wildcard characters: | True |
Specifies services that this cmdlet omits. The value of this parameter qualifies the Name parameter. Enter a name element or pattern, such as s* . Wildcard characters are permitted.
Type: | String [ ] |
Position: | Named |
Default value: | None |
Accept pipeline input: | False |
Accept wildcard characters: | True |
Specifies services that this cmdlet starts. The value of this parameter qualifies the Name parameter. Enter a name element or pattern, such as s* . Wildcard characters are permitted.
Type: | String [ ] |
Position: | Named |
Default value: | None |
Accept pipeline input: | False |
Accept wildcard characters: | True |
Specifies ServiceController objects representing the services to be started. Enter a variable that contains the objects, or type a command or expression that gets the objects.
Type: | ServiceController [ ] |
Position: | 0 |
Default value: | None |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Specifies the service names for the service to be started.
The parameter name is optional. You can use Name or its alias, ServiceName, or you can omit the parameter name.
Type: | String [ ] |
Aliases: | ServiceName |
Position: | 0 |
Default value: | None |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Returns an object that represents the service. By default, this cmdlet does not generate any output.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: | SwitchParameter |
Aliases: | wi |
Position: | Named |
Default value: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Inputs
System.ServiceProcess.ServiceController, System.String
You can pipe objects that represent the services or strings that contain the service names to this cmdlet.
Outputs
None, System.ServiceProcess.ServiceController
This cmdlet generates a System.ServiceProcess.ServiceController object that represents the service, if you specify PassThru. Otherwise, this cmdlet does not generate any output.
Notes
This cmdlet is only available on Windows platforms.
- You can also refer to Start-Service by its built-in alias, sasv . For more information, see about_Aliases.
- Start-Service can control services only if the current user has permission to do this. If a command does not work correctly, you might not have the required permissions.
- To find the service names and display names of the services on your system, type Get-Service . The service names appear in the Name column, and the display names appear in the DisplayName column.
- You can start only the services that have a start type of Manual, Automatic, or Automatic (Delayed Start). You cannot start the services that have a start type of Disabled. If a Start-Service command fails with the message Cannot start service \ on computer , use Get-CimInstance to find the start type of the service and, if you have to, use the Set-Service cmdlet to change the start type of the service.
- Some services, such as Performance Logs and Alerts (SysmonLog) stop automatically if they have no work to do. When PowerShell starts a service that stops itself almost immediately, it displays the following message: Service \ start failed.
Start or stop Windows service from command line (CMD)
We normally use Services.msc to start or stop or disable or enable any service. We can do the same from windows command line also using net and sc utilities. Below are commands for controlling the operation of a service.
Command to stop a service:
To start a service:
You need to have administrator privileges to run net start/stop commands. If you are just a normal user on the computer, you would get an error like below.
To disable a service:
To enable a service:
To make a service start automatically with system boot:
Note: Space is mandatory after ‘=’ in the above sc commands.
This SC command works on a Windows 7 machine and also on the down-level editions of Windows i.e Windows XP/2003 and Windows Vista. Again, if you do not have administrator previliges you would get the below error.
Note that the service name is not the display name of a service. Each service is given a unique identification name which can be used with net or sc commands. For example, Remote procedure call (RPC) is the display name of the service. But the service name we need to use in the above commands is RpcSs.
So to start Remote procedure call service the command is:
These service names are listed below for each service. The first column shows the display name of a service and the second column shows the service name that should be used in net start or net stop or sc config commands.
How to open Windows Services Manager in Windows 10
At times you may need to open and manage your Windows Services. You may want to stop some service, start it, disable the service, delay its start-up or resume or pause the Windows Service. At such time, the Services Manager, which is a built-in tool in the Windows operating system, will help you. This post will show you how to open your Windows Services, using Services Manager as well as the Command Prompt.
Windows Services are applications that typically start when the computer is booted and run quietly in the background until it is shut down. Strictly speaking, a service is any Windows application that is implemented with the services API and handles low-level tasks that require little or no user interaction.
How to open Windows Services Manager
To open the Windows Services Manager on your Windows 10 computer, do the following:
- Right-click on the Start button to open the WinX Menu
- Select Run
- Type services.msc in the Run box which opens
- Windows Services Manager will open.
Here you will be able to start, stop, disable, delay Windows Services.
Let us see how to do this in a bit more detail.
Right-click on your Start button to open the WinX Menu. Select Run. This opens the Run box. Now type services.msc in it and hit Enter to open the Services Manager.
Here, under the Name column, you will see the list of Services running on your system, along with their description. You will also be able to see their Status -whether they are running or stopped, along with the Startup types.
Types of Windows Services startup
Windows 10 offers four start-ups types:
- Automatic
- Automatic (Delayed Start)
- Manual
- Disabled.
Start, stop, disable Windows Services
To start, stop, pause, resume or restart any Windows Service, select the Service and right-click on it. You will be offered these options.
If you wish to manage more options, double-click on the Service to open its Properties box.
Here, under the Startup type drop-down menu, you will be able to select the startup type for the Service.
Under Service status, you will see buttons to Start, Stop, Pause, Resume the Service.
In the Properties box, you will also see other tabs like Log On, Recovery & Dependencies, which offer additional options and information.
Once you have made your changes, you will have to click on Apply and restart your computer, for the changes to take effect.
Read: What does Automatic (Trigger Start) and Manual (Trigger Start) mean for Windows Services?
Manage Services using Command Line
You can also use the Command Prompt to start, stop, pause, resume service. To use it, from the WinX Menu, open Command Prompt (Admin) and execute one of the following commands:
To start a service:
To stop a service:
To pause a service:
To resume a service:
To disable a service:
It is recommended that you not change the default settings unless you know what you are doing, as this can cause some parts of your operating system to stop working. When you stop, start, or restart a service, any dependent services are also affected, so you want to be careful here.
How to Start or Stop a Service in Windows 10/8/7
A service is an application type that runs in the system background without any user interface, and without needing a user to log in to the PC. You can manage them start, stop, and disable actions for services on local and remote computers.
How to start, stop, or disable a service in Services.MSC
This is the easiest way to start or disable a Windows Service.
Step 1: Open the Services snap-in window.
Press the Win + R keys to bring up Run dialog box, then type in services.msc, press Enter key.
Step 2: Then you Start, Stop, or Disable any service you want to change its action. To start a service, right-click on it, and then click Start.
Be careful when choosing to stop or restart services, because if you set these services to Disabled, Windows will prevent them from launching.
Step 3: You can manage a program Startup type by double-clicking on it.
In General tab, you can set a service to run as either automatically, manually at startup when a user signs in to Windows, or disabled a program to speed up boots process.
Here are the different startup types you’ll see for various services:
How to Start, Stop or Restart Services in Task Manager
You can easily start, stop, and restart a service in Task Manager.
Press Ctrl+Alt+Delete combination keys, then select Task Manager in security option screen.
Step 2: If it opens in mini mode, click onВ More detailsВ button.
Step 3: Click the Service tab. This tab displays all programs that start with Windows.
Then you can start a Service by right-clicking on it, then select Start.
Step 4: To disable or delay loading of Windows Services.
You can choose to stop or restart the Service which is in stopped Status.
How to Start or Disable a Service in Registry Editor
You can start, stop or disable a service by modifying registry key.
Press theВ Windows + RВ keys to open the Run dialog, type inВ regedit, and press Enter.
Tips: If it prompts a UAC dialog, click Yes. Learn more ways to disable UAC pop-up in Window10.
Step 2: In Registry Editor, go to the location of that service (example: VMTools):
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\VMTools
In the right pane of VMTools, double-click on Start В DWORD to modify its DWORD.
You can set that service to start automatically (Value data = 2), manually, or disable it. If I want to start that service manually, so I type digital 3 in that box under Value data.
Tips: There are a few Automatic services you could consider setting to Manual:
- If you don’t use a printer,В disable the Print Spooler service.
- If you’re notВ running a Tablet PC, disable the Tablet PC Input service.
- If you don’t connect cameras, webcams, or scanners to your PC, then disable the Windows Image Acquisition service.
When you are finished, close Registry Editor, and then restart computer.