Home Forums SQL Server 2014 Administration - SQL Server 2014 Powershell works differently in SQL Server 2014 RE: Powershell works differently in SQL Server 2014
Roust_m
SSCoach
Points: 17408
More actions
October 15, 2014 at 6:55 pm
#1752709
Fixed this by adding the code below. Yet this is a bug in SQL 2014.
$path = "A:MyDB\08_SPs $timestamp.sql"
$word = "ALTER "
$replacement = "GO `r`n ALTER "
$text = get-content $path
$newText = $text -replace $word,$replacement
$newText > $path