Morning to everyone except sqlcmd, batch separators and script variables, SMO etc. After all these years, there should be a standard reliable way to deal with having a portable multi-batch .sql script with variables etc that can run in sqlcmd, SSMS, C# and PowerShell.