Batch file 使用.bat启动powershell脚本
我可以在powershell中成功执行以下脚本,但当我尝试从.bat运行脚本时,我失败了。是否存在某种方式,.bat文件在不断失败时调用powershell脚本。 如何创建.bat脚本来运行下面的powershell脚本Batch file 使用.bat启动powershell脚本,batch-file,powershell-3.0,Batch File,Powershell 3.0,我可以在powershell中成功执行以下脚本,但当我尝试从.bat运行脚本时,我失败了。是否存在某种方式,.bat文件在不断失败时调用powershell脚本。 如何创建.bat脚本来运行下面的powershell脚本 cd 'Program Files (x86)\Citrix \XenApp \ServerConfig' .\XenAppConfigConsole.exe /ExecutionMode:Join /FarmName:xencity /OdbcUsername:chris /
cd 'Program Files (x86)\Citrix \XenApp \ServerConfig' .\XenAppConfigConsole.exe /ExecutionMode:Join /FarmName:xencity /OdbcUsername:chris /odbcPassword:Jahner0 /DsnFile:"C:\xencitylifeSQLDS.dsn"
请帮帮我
非常感谢您可以通过将
powershell
放在命令开头来完成此操作
powershell cd'程序文件(x86)\Citrix\XenApp\ServerConfig.\XenAppConfigConsole.exe/ExecutionMode:Join/FarmName:xencity/OdbcUsername:chris/odbcPassword:Jahner0/DsnFile:“C:\xencitylifeSQLDS.dsn”
这只需调用powershell并向其提供运行命令,除了在cmd中运行它