0

I am running below powershell script: It has .exe file to run by taking input file and write into output file. But, I dont see output file is written anything when executing script.

Input file has list of queries which will be executed by srvrmgr.exe file

#Input File
$InputFile = "C:\Siebel\SiebelInput.txt"

#Output File
$OutputFile = "C:\Siebel\siebelOutput.txt"

#command Siebel
$BatchFileCommand = "C:\Siebel\siebsrvr\BIN\srvrmgr.exe /g SblGateway /e ENT_17 /u SADMIN /p xxxx /i $InputFile /o $OutputFile"

Can you please help me if something is missing here?

Thank you

1 Answer 1

1

Your last command merely assigns the string to the variable $batchFileCommand. Try something like this:

& "C:\Siebel\siebsrvr\BIN\srvrmgr.exe" /g SblGateway /e ENT_17 /u SADMIN /p xxxx /i $InputFile /o $OutputFile
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.