Hello all,
I'm facing the following issue: I cannot stop the winlogbeat service either automatically or manually. The service can be stopped only after clicking "End Task" in the Task Manager. I did test the same Ansible role against several servers on-premises and in the cloud.
If I try to do it manually (run Power Shell as Admin):
PS C:\Program Files\Winlogbeat> .\uninstall-service-winlogbeat.ps1
Stop-Service : Service 'winlogbeat (winlogbeat)' cannot be stopped due to the following error: Cannot stop winlogbeat
service on computer ''.''.'
At C:\Program Files\Winlogbeat\uninstall-service-winlogbeat.ps1:3 char:3
+ Stop-Service winlogbeat
+ ~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : CloseError: (System.ServiceProcess.ServiceController:ServiceController) [Stop-Service],
ServiceCommandException
+ FullyQualifiedErrorId : CouldNotStopService,Microsoft.PowerShell.Commands.StopServiceCommand
After that, the Power Shell hangs completely and the winlogbeat service is in a permanent Stopping state.
But when I "End Task" in the Task Manager it works fine.