I was recently working on a PowerShell script to set up some new databases for my users and found myself writing the same things over and over again.
1 2 3 Invoke-DbaQuery -SqlInstance MyServer -Database $SrcDB -Query "select field1 from table..."; Invoke-DbaQuery -SqlInstance MyServer -Database $DstDB -Query "update table..."; Invoke-DbaQuery -SqlInstance MyServer -Database $DstDB -Query "insert into table..."; By the 4th Invoke-DbaQuery, I found myself thinking “this repetitive typing kind of sucks.