Skip to content

Commit

Permalink
Invoke-XrmSqlCommand : Fix host property
Browse files Browse the repository at this point in the history
  • Loading branch information
Aymeric Mouillé committed Dec 21, 2024
1 parent b67d65d commit e84a15a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/SQL/Invoke-XrmSqlCommand.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ function Invoke-XrmSqlCommand {
Assert-XrmTdsEndpointEnabled -XrmClient $XrmClient;
}
process {
$sqlConnectionString = "server=$($XrmClient.CrmConnectOrgUriActual.Host)";
$sqlConnectionString = "server=$($XrmClient.ConnectedOrgUriActual.Host)";

$connection = new-object System.Data.SqlClient.SQLConnection($sqlConnectionString);
$connection.AccessToken = $XrmClient.CurrentAccessToken;
Expand Down

0 comments on commit e84a15a

Please sign in to comment.