powershell - 以编程方式停止 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 中终止它;但这违背了将功能嵌入程序的目的。
有什么想法或建议吗?
解决方案
您可以使用以下命令阻止 Defendpoint 工作:
Stop-Service -InputObject "Avecto Defendpoint Service" -Force
完成并需要重新启用它后,请使用以下命令:
Start-Service -InputObject "Avecto Defendpoint Service"
推荐阅读
- c# - 开/关本金多层次
- sql - Oracle SQL 中的模式匹配
- freemarker - 如何在 FreeMarker 模板中调试低效的 JCR 查询?
- node.js - MSSQL - 节点 - 内存泄漏
- python - 如何在类主体中模拟外部模块调用和测试代码
- objective-c - 在objective-c中调用self.class上的方法实际上不是类方法时如何获得编译时失败?
- python - 加载文本文件时如何保持好行和坏行?
- flutter - Flutter - 将函数传递给 StatelessWidget 不起作用
- c++ - 多 GPU 批处理 1D FFT:似乎只有一个 GPU 可以工作
- javascript - GTM 和优化:JS 变量未定义,但在控制台中运行良好