I am trying to find out a solution by passing the REPLACE command through the batch file as the "ReplaceTagsOnConfigFiles.ps1" will work when the file is executed with REPLACE option or otherwise, it will ask for the [REPLACE | ROLLBACK]
Below is the batch file:
echo "Changing the execution policy"
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -command {Set-ExecutionPolicy} > C:\Temp\a.out
echo "Updating the Server details:"
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -command "D:\test\Bluebird_1.2.0_RTM\ReplaceTagsOnConfigFiles.ps1;REPLACE" > C:\Temp\b.out
When the above batch file is executed, it pops up the message as shown below.
Available commands:
* Replace all strings to get the new configuration from every .config and .x aml file.
* Remove the current configuration and retrieving the old ones (the replace must be executed before).
ReplaceTagsOnConfigFiles.ps1 [REPLACE | ROLLBACK]
REPLACE Replaces all strings in every .config and .xaml file to build the new configuration.
ROLLBACK Retrieving the old configuration from backups. NOTE: this option is useful just if you used the 'replace' one before.
No files replaced
Kindly help me in this regard.