• Try moving the open quote onto the same line as the invoke-sqlcmd -query. I think it has to do with white space and how it is reading the script. I'll take a look at it when I get into the office.