Many a SQL script written in management studio is actually sent as more than one statement. Select-SQL should split any sqlstatement by a single line containing 'GO', and run each statement one by-one.