首页 > 解决方案 > 以编程方式停止 Avecto Defendpoint

问题描述

在任何人谈论访问权限之前...我拥有对服务的完全访问权限,并且可以手动停止 Avecto Defendpoint 服务和 Avecto Defendpoint ePO 接口。而且,所有将使用此应用程序的用户也将拥有管理员权限。

我试图找到一种通过 PowerShell 停止 Avecto Defendpoint 服务的方法。我试过了...

右键单击 PowerShell(以管理员身份运行)

Stop-Service -Name "Avecto Defendpoint Service"

以此作为回应...

Stop-Service : Service 'Avecto Defendpoint Service (Avecto Defendpoint
Service)' cannot be stopped due to the following error: Cannot open Avecto
Defendpoint Service service on computer '.'.

我也尝试过使用 -Force 参数,结果相同。如果我在运行 PowerShell 之前手动禁用 Avecto,我可以再次手动启动服务备份,然后我可以按预期从 PowerShell 中终止它;但这违背了将功能嵌入程序的目的。

有什么想法或建议吗?

标签: powershell

解决方案


您可以使用以下命令阻止 Defendpoint 工作:

Stop-Service -InputObject "Avecto Defendpoint Service" -Force

完成并需要重新启用它后,请使用以下命令:

Start-Service -InputObject "Avecto Defendpoint Service"

推荐阅读