Get-ChildItem ".\Stored Procedures\*.sql" | ForEach-Object { sqlcmd -S ServerName -d DatabaseName -E -i $_.FullName }
When I run a batch of scripts from a folder with the above command, if a problem persists in the intermediate script (like create/Alter/DROP DML script in between) then it should stop there only and need to give me an error message.