- Trending Categories
- Data Structure
- Operating System
- C Programming
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to remove Windows service with PowerShell?
We need to remove the window service named TestService using PowerShell. If you are using PowerShell 6.0 or above version, you can directly use a cmdlet Remove-Service command as shown below.
In this example, we have a service name called TestService.
Remove-Service Testservice -Confirm:$false -Verbose
If you are using the PowerShell framework version (5.1 or below), you need to use the registry. Services are stored in the registry at the below location.
To delete the service, we need to remove that service key with the command as shown below.
Get-Item HKLM:\SYSTEM\CurrentControlSet\Services\TestService | Remove-Item -Force -Verbose
Here we are using the Service name TestService and you need to reboot the server after running the above command.
- How to start windows service with display name in PowerShell?
- How to stop a windows service using PowerShell?
- How to start a windows service using PowerShell?
- How to remove windows features using PowerShell?
- How to remove windows folder sharing using PowerShell?
- How to Install Windows Features with PowerShell?
- How to install a windows service using windows command prompt in C#?
- How to stop service with their dependent services using PowerShell?
- How to stop service with their dependent services in PowerShell?
- How to get service information with the WMI method using PowerShell?
- How to stop the service with the display name in PowerShell?
- How to Get Windows features using PowerShell?
- How to remove Fake Windows Security Alert?
- How to start multiple windows services using PowerShell?
- How to disable windows firewall profiles using PowerShell?