Verified issue does not already exist?
I have searched and found no existing issue
What error did you receive?
Export-DbaLinkedServer in specific cases keeps spamming in the SQL server log with error below:
"Could not connect because the maximum number of '1' dedicated administrator connections already exists. Before a new connection can be made, the existing dedicated administrator connection must be dropped, either by logging off or ending the process."
Steps to Reproduce
- Connect to SQL server via RDP or PSRemoteSession
- Run Export-DbaLinkedServer -SqlInstance SERVERNAME -LinkedServer LINKEDNAME
- Look at SQL server logs, you should see error about multiple DAC connections not allowed
- Issue does not reproduce when command executed from another PC, only at SQL server itself
Please confirm that you are running the most recent version of dbatools
2.7.23-2.7.25
Other details or mentions
Issue exists in Connect-DbaInstance function called from Export-DbaLinkedServer with $DedicatedAdminConnection parameter.
It builds up connection string to servername passed from user input and produces multiple connections attempts to all resolved IP addresses.

In
#10106 issue was fixed for all connections from outside, but still persist when dbatools executed locally.
What PowerShell host was used when producing this error
Windows PowerShell (powershell.exe)
PowerShell Host Version
Name Value
PSVersion 5.1.20348.4294
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.20348.4294
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
SQL Server Edition and Build number
Microsoft SQL Server 2022 (RTM-CU20) (KB5059390) - 16.0.4205.1 (X64) Jun 13 2025 13:38:45 Copyright (C) 2022 Microsoft Corporation Enterprise Edition: Core-based Licensing (64-bit) on Windows Server 2022 Datacenter 10.0 (Build 20348: )
.NET Framework Version
PSChildName Version
Client 4.8.04161
Full 4.8.04161
Client 4.0.0.0
Verified issue does not already exist?
I have searched and found no existing issue
What error did you receive?
Export-DbaLinkedServer in specific cases keeps spamming in the SQL server log with error below:
"Could not connect because the maximum number of '1' dedicated administrator connections already exists. Before a new connection can be made, the existing dedicated administrator connection must be dropped, either by logging off or ending the process."
Steps to Reproduce
Please confirm that you are running the most recent version of dbatools
2.7.23-2.7.25
Other details or mentions
Issue exists in Connect-DbaInstance function called from Export-DbaLinkedServer with $DedicatedAdminConnection parameter.
It builds up connection string to servername passed from user input and produces multiple connections attempts to all resolved IP addresses.
What PowerShell host was used when producing this error
Windows PowerShell (powershell.exe)
PowerShell Host Version
Name Value
PSVersion 5.1.20348.4294
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.20348.4294
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
SQL Server Edition and Build number
Microsoft SQL Server 2022 (RTM-CU20) (KB5059390) - 16.0.4205.1 (X64) Jun 13 2025 13:38:45 Copyright (C) 2022 Microsoft Corporation Enterprise Edition: Core-based Licensing (64-bit) on Windows Server 2022 Datacenter 10.0 (Build 20348: )
.NET Framework Version
PSChildName Version
Client 4.8.04161
Full 4.8.04161
Client 4.0.0.0