How To Stop A Windows Service With Jenkins
On Windows x, services are programs that run in the background without a user interface and enable system features (such equally printing, networking, remote admission, File Explorer, Windows Search, updates, etc.) and apps to operate equally intended.
Although the system does a pretty good job managing background services, sometimes, y'all may demand to command them manually when a feature or app isn't working correctly, or an app requires y'all to manage its services manually.
Whatsoever the instance information technology might exist, Windows 10 includes at least four methods to stop, start, disable, or enable services using the Services console, Task Director, Command Prompt, and PowerShell.
In this Windows x guide, nosotros'll walk you through the steps to manage system and apps services on your computer.
- How to manage services using Services console
- How to manage services using Task Manager
- How to manage services using PowerShell
- How to manage services using Command Prompt
How to manage services using Services console
Using the Services consoles is perhaps the simplest method to end, start, disable, or enable one or multiple services on Windows 10.
Stop service
To stop a running service using Services, use these steps:
- Open Start.
- Search for Services and click the top issue to open up the console.
- Double-click the service that you intend to stop.
-
Click the Cease button.
Quick tip: You can also manage the state by right-clicking the service and selecting the selection. Or you can select the service and then use the controls at the top to start, stop, intermission, or restart.
- Click the Apply push.
- Click the OK button.
Once you complete the steps, the service will stop running on the device.
If yous're unable to stop a arrangement service, consider that some services are required for the performance of Windows 10, and they can't be stopped.
Start service
To start a service on Windows 10, utilize these steps:
- Open Commencement.
- Search for Services and click the top upshot to open the panel.
- Double-click the service that you intend to finish.
-
Click the Beginning button.
- Click the Apply button.
- Click the OK button.
After you complete the steps, the service yous specified volition start for the current session.
Disable service
To set a service a disabled, use these steps:
- Open Get-go.
- Search for Services and click the elevation event to open the console.
- Double-click the service that you intend to stop.
- Click the Stop button.
-
Use the "Outset blazon" drop-downwardly menu and select the Disabled option.
- Click the Apply push.
- Click the OK push.
Once you complete the steps, the service will no longer kickoff automatically after restarting your device.
Enable service
To enable a specific service, employ these steps:
- Open Get-go.
- Search for Services and click the top result to open the console.
- Double-click the service that y'all intend to terminate.
- Click the Offset button.
-
Use the "Start type" drop-down card and select the Automated option.
These are the Startup types on Windows x:
- Automatic – service starts at boot.
- Automated (Delayed Start) – service first after boot.
- Transmission – starts service manually as needed.
- Disabled – stops service from running.
- Click the Utilise button.
- Click the OK push.
Later on you consummate the steps, the Windows ten or app service will enable, but if it was in a stopped state, you lot'd need to beginning information technology manually or restart the device for the service to run.
How to manage services using Task Director
Task Director also includes a department to quickly manage services for Windows 10 and apps.
To stop, outset, or restart a service using Chore Managing director, employ these steps:
- Open Kickoff.
-
Search for Task Manager and click the superlative upshot to open the app.
Quick tip: Windows 10 includes many other ways to open the experience, including right-clicking the taskbar and selecting the Job Director selection and using the Ctrl + Shift + ESC keyboard shortcut.
- Click the Services tab.
-
Right-click the service name, and select one of the options:
- Stop.
- First.
- Restart.
Quick annotation: Task Manager only displays the service proper name, not the brandish name. For case, if y'all're using this method, y'all'll the "Impress Spooler" defined as "Spooler."
Once yous consummate the steps, the service volition respond to the pick yous selected.
How to manage services using PowerShell
You can also use PowerShell commands to manage groundwork services for Windows 10 and apps.
Stop service
To end a specific service with PowerShell, utilize these steps:
- Open up Start.
- Search for PowerShell, correct-click the top result, and select the Run equally administrator option.
-
(Optional) Type the following command to view a listing of all the services and press Enter:
Get-Service
-
Type the following control to stop a service and press Enter:
Cease-Service -Proper name "SERVICE-Proper name"
For example, this command stops the printer spooler service on Windows x:
Cease-Service -Proper name "spooler"
In the control, supplant "SERVICE-Proper noun" for the name of the service that y'all intend to stop. If yous want to apply the display proper noun, replace
-Name
for-DisplayName
and then specify the brandish proper name of the service.Alternatively, you can likewise apply this variant of the command to cease the service:
Set-Service -Name "SERVICE-NAME" -Status stopped
In the command, supercede "SERVICE-Name" for the name of the service that you intend to stop. If yous want to employ the display name, replace
-Name
for-DisplayName
then specify the display name of the service. You only need the quotation marks if there's a space within the proper name.Quick tip: If you're getting a dependency error, you lot tin can suspend the
-force
pick in either of the commands to end the service. For example,Stop-Service -Proper noun "SERVICE-Proper noun" -Forcefulness
.
Afterwards you consummate the steps, the PowerShell command will stop the service on your device.
Start service
To start a Windows 10 or app service with PowerShell, utilize these steps:
- Open Start.
- Search for PowerShell, right-click the top event, and select the Run as administrator option.
-
Type the following command to get-go a service and press Enter:
Showtime-Service -Name "SERVICE-NAME"
For example, this control starts the printer spooler service on Windows 10:
Beginning-Service -Name "spooler"
In the command, supersede "SERVICE-NAME" for the name of the service. Using the brandish name is supported, replacing
-Proper name
for-DisplayName
so specify the display name of the service.Alternatively, you tin also employ this variant of the command to start a service:
Gear up-Service -Name "SERVICE-NAME" -Status running
In the command, replace "SERVICE-NAME" for the name of the service. If you desire to use the display name, replace
-Name
for-DisplayName
and and so specify the display name of the service.
In one case you lot consummate the steps, the service will start on your figurer.
Disable service
To disable a service using a PowerShell control, utilize these steps:
- Open Start.
- Search for PowerShell, correct-click the top outcome, and select the Run as administrator option.
-
Type the following command to disable a service and press Enter:
Gear up-Service -Name "SERVICE-NAME" -Status stopped -StartupType disabled
In the command, update "SERVICE-Proper noun" for the name of the service. If yous desire to use the display proper name of the service, then replace
-Name
for-DisplayName
and specify the service name. If yous desire to disable the service without stopping it immediately, you can remove the-Status stopped
portion of the command.For example, this control disables the printer spooler service on Windows 10:
Set-Service -Name "spooler" -Status stopped -StartupType disabled
Afterward you complete the steps, the PowerShell command volition disable the specified service.
Enable service
To enable a specific background service with PowerShell, use these steps:
- Open up Start.
- Search for PowerShell, right-click the top effect, and select the Run equally ambassador option.
-
Type the following control to enable a service and press Enter:
Set up-Service -Name "SERVICE-NAME" -Status running -StartupType automated
For example, this command enables the printer spooler service using PowerShell:
Ready-Service -Proper name "spooler" -Status running -StartupType automatic
Quick annotation: You may able to use the brandish
-DisplayName
option, but the command may also prompt you to supply the name of the service, calculation an extra step to the procedure. If y'all desire to enable the service without starting it immediately, you tin remove the-Status running
portion of the command.
One time you lot complete the steps, PowerShell will enable the service specified with the command.
How to manage services using Command Prompt
If y'all're comfortable using the command line, Command Prompt offers the "cyberspace" command (older) to stop or start, or the "sc" command (newer) to stop, start, disable, or enable services on Windows 10.
Stop service
To stop a Windows ten or app service with Control Prompt, use these steps:
- Open Start.
- Search for Command Prompt, right-click the top result, and select the Run as administrator selection.
-
(Optional) Type the following command to view a list of all the services and printing Enter:
sc queryex state=all type=service
-
Type the post-obit command to finish a service and press Enter:
net cease "SERVICE-NAME"
In the command, replace "SERVICE-NAME" for the proper name or display proper noun of the service. You only need the quotation marks if there'south a space within the name.
For example, this command stops the printer spooler using the service name:
net stop "spooler"
Alternatively, you can likewise use the more advanced "sc" command:
sc stop "SERVICE-NAME"
For instance, this command stops the printer spooler using the service name:
sc stop "spooler"
After y'all consummate the steps, the command volition terminate the specified service on Windows ten.
Start service
To start a service with the command line, utilise these steps:
- Open Start.
- Search for Command Prompt, right-click the top event, and select the Run as administrator option.
-
Blazon the following command to start a service and press Enter:
net get-go "SERVICE-Proper noun"
In the command, replace "SERVICE-Proper noun" for the proper name or brandish name of the service. You only demand the quotation marks if there'due south a space within the proper noun.
For example, this command starts the printer spooler using the service proper noun:
net beginning "spooler"
Alternatively, you lot can also use the "sc" command:
sc get-go "SERVICE-NAME"
For example, this command starts the printer spooler using the service name:
sc get-go "spooler"
Once you complete the steps, the command will execute and start the service you lot specified.
Disable service
To disable a service with Command Prompt, employ these steps:
- Open Start.
- Search for Command Prompt, correct-click the top consequence, and select the Run as ambassador option.
-
Type the following command to disable a service and press Enter:
sc config "SERVICE-NAME" offset=disabled
In the control, replace "SERVICE-NAME" for the proper noun of the service that y'all want to disable.
For example, this control disables printer spooler using the service name:
sc config "spooler" start=disabled
-
(Optional) Type the following control to stop the service and press Enter:
sc stop "SERVICE-NAME"
Quick notation: When you disable a service, it doesn't stop the current state of the service. You tin either restart your computer or terminate the service using the above command.
After yous complete the steps, the sc command will run disabling the Windows 10 or app service you specified.
Enable service
To enable a service with a command, use these steps:
- Open Start.
- Search for Command Prompt, right-click the top outcome, and select the Run as administrator option.
-
Type the following control to enable a service and press Enter:
sc config "SERVICE-NAME" start=auto
In the command, replace "SERVICE-NAME" for the name of the service that you desire to enable.
For example, this control enables the printer spooler automatically using the service proper noun:
sc config "spooler" start=auto
These are alternative commands to enable a particular service:
- Manual:
sc config "SERVICE-Proper noun" start=demand
- Automatic Delayed:
sc config "SERVICE-Proper noun" commencement=delayed-auto
- Manual:
-
(Optional) Type the following command to showtime the service and printing Enter:
sc start "SERVICE-Proper name"
In one case you consummate the steps, the service volition enable and start automatically on reboot according to the command you used.
You can but utilise the "net" command to start or stop services. The "sc" command allows you to perform more tasks, including start, finish, enable, or disable services, among other options. If you're choosing to manage services with command lines, then, in either case, it's best to employ the service name instead of the display name.
Also, when using whatever of the methods outlined higher up, consider that making modifications to the default settings can alter the operation of 1 or more than features that depend on that service negatively affecting the feel. Furthermore, if you lot restart a service, y'all might be required to offset its dependencies manually every bit well to make the app or characteristic operational again.
We're focusing this guide on Windows 10, just the ability to manage services has been available for several years, which means that y'all can refer to this guide if you're withal running Windows viii.1, Windows vii, and older versions.
More Windows 10 resources
For more than helpful articles, coverage, and answers to mutual questions about Windows 10, visit the following resources:
- Windows ten on Windows Central – All you lot need to know
- Windows 10 help, tips, and tricks
- Windows 10 forums on Windows Fundamental
Run across more
These are the all-time 27-inch monitors coin can buy
A 27-inch monitor is merely about the perfect size without having to sit as well far away or whip your head back and forth to follow things beyond the screen. If yous're in the market for a new monitor, check out our peak picks.
Then proficient
Review: Lenovo'due south Yoga 9i Gen 7 with OLED and speaker bar is simply superb
The Lenovo Yoga 9i 14 Gen7 for 2022 brings an all-new smoother, more modernistic design while amping upwardly the display and audio to new highs. Simply while the Intel 12th Gen P-series processor blows away even Apple tree's M1 for performance, battery life is this laptop's i weak spot. Here's our total review.
How To Stop A Windows Service With Jenkins,
Source: https://www.windowscentral.com/how-start-and-stop-services-windows-10
Posted by: staleycagaince.blogspot.com
0 Response to "How To Stop A Windows Service With Jenkins"
Post a Comment