Skip to content

Commit

Permalink
Invoke-DbaQuery, add docs for AG
Browse files Browse the repository at this point in the history
  • Loading branch information
niphlod committed Feb 20, 2025
1 parent a99229c commit a9862ab
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions public/Invoke-DbaQuery.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,13 @@ function Invoke-DbaQuery {
PS C:\> Invoke-DbaQuery -SqlInstance $server -Query 'SELECT * FROM bar WHERE SSN_col = @SSN' -SqlParameter @inputparamSSN
Creates an input parameter using Always Encrypted
.EXAMPLE
PS C:\> $server = Connect-DbaInstance -SqlInstance AG1 -Database dbatools -MultiSubnetFailover -ConnectTimeout 60
PS C:\> Invoke-DbaQuery -SqlInstance $server -Query 'SELECT foo FROM bar'
Reuses Connect-DbaInstance, leveraging advanced paramenters, to adhere to official guidelines to target FCI or AG listeners.
See https://learn.microsoft.com/en-us/dotnet/framework/data/adonet/sql/sqlclient-support-for-high-availability-disaster-recovery#connecting-with-multisubnetfailover
#>
[CmdletBinding(DefaultParameterSetName = "Query")]
param (
Expand Down

0 comments on commit a9862ab

Please sign in to comment.