Reputation: 1
I can execute the following script in powershell successfully but when i try to run the script from a .bat i am unsucessful.Is there a certain way that the .bat file calls the powershell script as it keeps failing. How would i create a .bat script to run the powershell script below.
cd 'Program Files (x86)\Citrix \XenApp \ServerConfig' .\XenAppConfigConsole.exe /ExecutionMode:Join /FarmName:xencity /OdbcUsername:chris /odbcPassword:Jahner0 /DsnFile:"C:\xencitylifeSQLDS.dsn"
Please help guys Many thanks
Upvotes: 0
Views: 1442
Reputation: 31221
You can do this by putting powershell
at the start of the command
powershell cd 'Program Files (x86)\Citrix \XenApp \ServerConfig' .\XenAppConfigConsole.exe /ExecutionMode:Join /FarmName:xencity /OdbcUsername:chris /odbcPassword:Jahner0 /DsnFile:"C:\xencitylifeSQLDS.dsn"
That just calls up powershell and gives it your command to run, except your running it in cmd.
Upvotes: 1