有没有办法针对远程计算机运行脚本来input特定DCOM应用程序的用户名和密码? 在本地服务器上,我可以打开命令提示符,然后键入:
dcomperm -runas {12345678-1234-1234-1234-00aa00bbf7c7} redmond\jdoe password
这似乎工作。 我试图用psexec做到这一点,并没有做任何事情,cmd.exe卡住,直到我杀了它。 我试过的命令是:
PsExec.exe \\Server1 -i cmd DComPerm.exe -runas {12345678-1234-1234-1234-00aa00bbf7c7} redmond\jdoe password
每次部署应用程序时手动执行此操作都变得很痛苦,我希望有一个能够回答问题的智能工具:)
从我们的谈话中:
您不需要在psexec
命令中转义反斜杠,也无需通过命令提示符运行dcomperm.exe
可执行文件。 所以你的命令应该是这样的
PsExec.exe \\Server1 -i DComPerm.exe -runas {12345678-1234-1234-1234-00aa00bbf7c7} redmond\jdoe password
从你的testing看来,为了正常工作,还有几个标志要添加,所以模板命令是
PsExec.exe \\Servernamehere -i -s /accepteula d:/releasescripts/dcomperm.exe -runas {AppIDhere} username password
其中“d:/ releasescripts”是dcomperm.exe所在的path。