Skip to content

Comments

Export-DbaInstance: Enhance handling of dedicated admin connections#10173

Merged
potatoqualitee merged 3 commits intodevelopmentfrom
dac_Export-DbaInstance
Feb 16, 2026
Merged

Export-DbaInstance: Enhance handling of dedicated admin connections#10173
potatoqualitee merged 3 commits intodevelopmentfrom
dac_Export-DbaInstance

Conversation

@andreasjordan
Copy link
Collaborator

Type of Change

  • Bug fix (non-breaking change, fixes # )
  • New feature (non-breaking change, adds functionality, fixes # )
  • Breaking change (affects multiple commands or functionality, fixes # )
  • Ran manual Pester test and has passed (Invoke-ManualPester)
  • Adding code coverage to existing functionality
  • Pester test is included
  • If new file reference added for test, has is been added to github.com/dataplat/appveyor-lab ?
  • Unit test is included
  • Documentation
  • Build system

When opening a connection we test if we need a DAC and we test if we already have a DAC. We reuse a DAC when possible. We remember if we opened a DAC to later be able to close it.

Get-DecryptedObject needs two things:

  • A Dedicated Admin Connection (DAC) to select master.sys.syslnklgns
  • A WinRM connection to read "HKLM:\SOFTWARE\Microsoft\Microsoft SQL Server$serviceInstanceId\Security"

That's why Get-DecryptedObject needs $Credential which it used all the time, but the parameter was missing. So every command that calls Get-DecryptedObject needs $Credential as well. And every command that calls one of those commands as well.

@andreasjordan
Copy link
Collaborator Author

Test passes in my lab so I have to find out why it fails on AppVeyor...

@andreasjordan
Copy link
Collaborator Author

Sometimes AppVeyor generates very long hostnames. So using the COMPUTERNAME env variable is saver when we need to open DACs.

@potatoqualitee
Copy link
Member

reasonable! ty 🙏🏼

@potatoqualitee potatoqualitee merged commit dd58a4e into development Feb 16, 2026
14 checks passed
@potatoqualitee potatoqualitee deleted the dac_Export-DbaInstance branch February 16, 2026 22:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants