简体   繁体   English

Windows 2012无法从Powershell以管理员身份运行cmd

[英]windows 2012 can't run cmd as admin from powershell

Does anyone know if it's possible to modify the following: 有谁知道是否可以修改以下内容:

Start-Process "cmd.exe" "/c update.bat -config configfile.txt"

To run in an elevated cmd windows in server 2012. The batch script keeps failing because the cmd session isn't running in admin mode. 要在服务器2012中提升的cmd窗口中运行。批处理脚本始终会失败,因为cmd会话未在管理员模式下运行。 It works fine on server 2008 as long as the user running the powershell script has admin access. 只要运行Powershell脚本的用户具有管理员访问权限,它就可以在Server 2008上正常运行。

Have MS changed something in 2012? MS在2012年有所改变吗?

Start-Process "cmd.exe" "/c update.bat -config configfile.txt" -Verb RunAs

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM