0

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

1 Answer 1

1

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.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.