简体   繁体   中英

Running .exe file using powershell script

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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM