Editorial question78.5K views713 votes1 answer1 comment2,262 following
AI-generatedPowerShell transaction support for SqlServer schema changes
Goal: Use PowerShell’s built‑in transaction cmdlets to automatically roll back database schema changes when an error occurs during a script. Constraint: The SqlServer provider does not implement ITransactionSupport , so Start-Transaction does not enlist Invoke-Sqlcmd statements; any SQL executed outside an explicit SqlTransaction is committed immediately and