MSDeploy RunCommand特权 [英] MSDeploy RunCommand Priviliges

查看:68
本文介绍了MSDeploy RunCommand特权的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在MSDeploy中使用-presync:runCommand选项,无论我尝试运行什么,都将返回相同的错误:

I am trying to use the -presync:runCommand option in MSDeploy and no matter what I try to run, I get the same error back:

错误:客户端未拥有所需的特权.

Error: A required privilege is not held by the client.

我尝试了一些要执行的项目,但没有一个起作用.理想情况下,我想像这样在服务器上执行exe:

I've tried a handful of items to execute, and none of them work. Ideally I want to execute an exe on the server as such:

-presync:runCommand=C:\MyExecutable.exe,dontUseCommandExe=true

我也尝试过

-presync:runCommand=C:\TestScript.bat

以及其文档中的示例

-presync:runCommand="net stop w3svc"

谢谢.

推荐答案

我找到了答案,事实证明我已经完成了一半.在我提供的问题链接中,他们提到了如何向WMSvc帐户添加特权,如下所示:

I found the answer, and it turns out I had already halfway completed it. In the link I provided in my question, they mention how to add privileges to the WMSvc account, like so:

sc privs wmsvc SeChangeNotifyPrivilege/SeImpersonatePrivilege/SeAssignPrimaryTokenPrivilege/SeIncreaseQuotaPrivilege

没有提及的是您必须重新启动WMSvc才能使它生效.

What it failed to mention is that you must restart WMSvc for this to take affect.

这篇关于MSDeploy RunCommand特权的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆