I am trying to automate restores using CommVault. Part of that is to generate XML files. I’ll circle back here when I’m done with programming it. Or maybe I’ll have my company sell it. Probably no one wants it though. Anyway, cut to the chase…
When the batch file was calling the XML file that I created, I was receiving this:
“execute: Error 0x908: Invalid XML Input. Please check the input.”
When I checked, my files were exactly the same, even special characters.
It turned out to be a difference in encoding. CommVault was looking for utf-8. My file, created from Powershell, was encoding in ucs-2.
To rectify this, I changed the encoding of the file with Powershell by using the encode flag.
$XMLOutput | Out-File “RestoreParameters.xml” -Encoding “UTF8”;