I'm going to take a wild guess as to what you're trying to do:
$a=@("not`r`nError {0} found in XML!" -f (get-date -Format "dd-MMM-yyyy HH:MM:ss" ))
You need to surround the "get-date" within parenthesis for Powershell to parse it properly.
You were missing the closing double-quote after "XML!".
Your date format was incorrect, too. You have "as" where you should have "ss".
I have no idea why you've made the variable "$a" into an array of just one string. Was that intentional?
--- Rich Matheisen MCSE&I, Exchange Ex-MVP (16 years)