MSDeploy RunCommand Priviliges
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.
I've tried a hand开发者_JAVA百科ful 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
I've also tried
-presync:runCommand=C:\TestScript.bat
And the sample from their documentation
-presync:runCommand="net stop w3svc"
Thanks in advance.
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
What it failed to mention is that you must restart WMSvc for this to take affect.
精彩评论