PowerShell: Invoke-SqlCmd4 - A Superior SQL Commandlet
Note: This is part of a series of posts where I’m improving some of my older blog posts.
Recently, I wrote about one of the issues with the Invoke-SqlCmd commandlet where it sets the ApplicationName when you use the parameter that should set the host.
Fellow MVP Ben Miller sent me a copy of the Invoke-SqlCmd3 that they were using. It was much better.
I then realized that there were many other options missing from these commandlets (such as options for Database Mirroring and Availablity Groups) and so I set about improving it.
2026-07-01




