here's as discussed on slack (still a day or two late, sorry) the improvements on invoke-sqlcmd2, backported from what dbatools' will shortly leverage.
Actions (maybe they should be inserted in CHANGELOG, too, with ParseGO that we forgot to add already ^_^), roughly in logic order:
move all write-verbose to write-debug. Using Invoke-Sqlcmd2 when you're more interested in the messages rather than the actual resultset was hard/cumbersome. Think running Ola's maintenance with it ...
now that the verbose stream (when there are no errors) just holds the messages, Invoke-Sqlcmd2 has unbuffered messages available, which is one of the many things I loved since its creation
here's as discussed on slack (still a day or two late, sorry) the improvements on invoke-sqlcmd2, backported from what dbatools' will shortly leverage.
Actions (maybe they should be inserted in CHANGELOG, too, with ParseGO that we forgot to add already ^_^), roughly in logic order:
There are examples for the last feature, which took me some time to craft together with the invaluable help of @FriedrichWeinmann
NOTE: -MessagesToOutput leverages functionality that is there just from Powershell 3 onwards