如何继续从AX运行Powershell脚本?有可能通过批处理来做到这一点吗?我的意思是AX允许在服务器端进程中执行此操作吗?我在运行某些进程(例如FTP上传,文件生成等)时遇到很多问题。
感谢帮助
问候,
汤玛士

最佳答案

我使用了以下代码,它可以正常工作:

System.Diagnostics.Process  process;
System.Diagnostics.ProcessStartInfo startInfo;
;
process = new System.Diagnostics.Process();
startInfo = new System.Diagnostics.ProcessStartInfo();
startInfo.set_FileName("powershell.exe");
startInfo.set_Arguments("path_to_my_powershell_script");

startInfo.set_UseShellExecute(false);
startInfo.set_RedirectStandardError(true);
process.set_StartInfo(startInfo);
process.Start();

关于powershell - 使用AX 2009调用Powershell脚本,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/16580931/

10-13 03:07