[Solved] How to delete a Windows service in service window? Access deny - S7an Insights

Breaking

S7an Insights

生活 × 技術 × 分享 讓複雜的問題,有條理地解決。

2020年2月19日 星期三

[Solved] How to delete a Windows service in service window? Access deny


A customize Windows server cannot uninstall even PowerShell login with Administrators.

When I try to delete a Windows service, the error message shows me "Access deny".

I have tried this command --> sc delete "Service Name"
But it's still not working.

Finally, it was solved after I found this solution.
1. Using PowerShell(Run as Administrators)
2. then assign a parameter to store the service object.
3. execute the delete method.

Thanks to the reference link.


$service = Get-WmiObject -Class Win32_Service -Filter "Name='servicename'"
$service.delete()


Ref:
https://www.winhelponline.com/blog/how-to-remove-unwanted-service/

沒有留言:

張貼留言

問題沒有大小或好壞