Why should I prefer Invoke-DbaQuery to its alternatives?
1
vote
2
answers
604
views
[The documentation](https://docs.dbatools.io/Invoke-DbaQuery.html) for
Invoke-DbaQuery
mentions many other similar functions
> This function is a wrapper command around Invoke-DbaAsync
, which in turn is based on Invoke-SqlCmd2
. It was designed to be more convenient to use in a pipeline and to behave in a way consistent with the rest of our functions.
There are of course other ways to query SQL from PowerShell, e.g. Invoke-Sqlcmd
.
What are the benefits of using Invoke-DbaQuery
instead of Invoke-Sqlcmd
, Invoke-Sqlcmd2
, and Invoke-DbaAsync
?
Asked by J. Mini
(1237 rep)
Jan 26, 2024, 07:37 PM
Last activity: Jul 20, 2025, 04:35 PM
Last activity: Jul 20, 2025, 04:35 PM