Releases: dataplat/dbatools
v2.7.7
Thank you to our 4 new contributors + claude 🤖 This is a big one which includes updates to dbatools.library. Also, check out the updated website at https://dbatools.io.
New Commands Added
- Add-DbaDbFile - Create new command to add files to database filegroups
- Compare-DbaAgReplicaAgentJob - Compare Agent Jobs between Availability Group replicas
- Compare-DbaAgReplicaCredential - Compare Credentials between Availability Group replicas
- Compare-DbaAgReplicaLogin - Compare Logins between Availability Group replicas
- Compare-DbaAgReplicaOperator - Compare Operators between Availability Group replicas
- Compare-DbaAvailabilityGroup - Compare Availability Group configurations
- Copy-DbaExtendedStoredProcedure - Copy Extended Stored Procedures between SQL Server instances
- Copy-DbaServerRole - Copy Server Roles between SQL Server instances
- Get-DbaAgDatabaseReplicaState - Get the replica state of databases in Availability Groups
- Sync-DbaLoginPassword - Synchronize login passwords between SQL Server instances
Renamed Commands
- Invoke-DbaAzSqlDbTip → Invoke-DbaDbAzSqlTip (renamed for consistency)
What Else's Changed
- Fix Get-DbaSchemaChangeHistory when no trace file exists by @SylvainDuran in #9852
- Test-DBALsnChain - Fix NullArray exception by @Philippe-Eversa in #9856
- Add server name to removal message in Remove-DbaDbUser for WhatIf clarity by @SylvainDuran in #9858
- Correct retrieval of server name in Remove-DbaCredential by @SylvainDuran in #9860
- Fix Set-DbaAgentJobStep: Add proxy removal support and prevent unwanted parameter resets by @SylvainDuran in #9861
- Fix Remove-DbaAgentJob to continue processing when jobs don't exist by @SylvainDuran in #9863
- Add Claude Code GitHub Workflow by @potatoqualitee in #9868
- Add secure credential storage guidance to readme by @potatoqualitee in #9872
- Copy-DbaDbTableData - Add documentation for temporal tables by @potatoqualitee in #9869
- Write-Progress - Add Completed and fix in multiple commands by @potatoqualitee in #9870
- New-DbaDbSnapshot - Add .Refresh() calls to fix AG secondary snapshots by @potatoqualitee in #9875
- Test-DbaLastBackup - Add Checksum parameter support by @potatoqualitee in #9874
- Restore-DbaDatabase - Fix ReplaceDbNameInFile to only replace filename, not directory path by @potatoqualitee in #9873
- Add-DbaAgDatabase - Add NoWait parameter to skip seeding wait by @potatoqualitee in #9878
- Sync-DbaAvailabilityGroup - Fix null reference errors when syncing empty Agent objects by @potatoqualitee in #9877
- Test Suite Runner - Add auto test selection based on changed files by @niphlod in #9882
- Copy-DbaDatabase - Fix SetSourceOffline to only run on successful copy by @potatoqualitee in #9880
- Stop-DbaService, Start-DbaService - Add PolyBase and Launchpad service type support by @potatoqualitee in #9879
- Invoke-DbaDbPiiScan - Fix TEXT, NTEXT, XML column handling by @peterkruis in #9890
- Update-DbaInstance - Fix NoPendingRenameCheck parameter not being passed to Test-PendingReboot by @niphlod in #9893
- Update Claude Code GitHub Workflow by @potatoqualitee in #9894
- Rename-DbaDatabase - Fix ReplaceBefore parameter error with empty strings by @potatoqualitee in #9888
- Enable-DbaAgHadr - Improve error message to show actual failure reason by @potatoqualitee in #9887
- Import-DbaCsv - Add support for custom delimiters by @potatoqualitee in #9884
- Compare-DbaAvailabilityGroup - Add commands to compare AG replica configurations by @potatoqualitee in #9886
- Remove-DbaReplArticle - Add replication library loading to fix Article type error by @potatoqualitee in #9892
- cut down appveyor's env matrix since we're now running serially by @potatoqualitee in #9896
- Publish-DbaDacPackage - Restore DacFxPath parameter functionality by @potatoqualitee in #9899
- Copy-DbaLogin - Protect BUILTIN\Administrators on SQL Server on Linux by @potatoqualitee in #9901
- Get-DbaDatabase - Add Pattern parameter for wildcard database filtering by @potatoqualitee in #9897
- Restore-DbaDbSnapshot - Add retry logic for deadlock errors by @potatoqualitee in #9900
- Invoke-DbaDbAzSqlTip - Rename function to match manifest exports by @jpomfret in #9903
- Get-DbaSchemaChangeHistory - Fix incorrect object type for indexes by @potatoqualitee in #9906
- Get-DbaCmObject - Add configurable CIM operation timeout by @potatoqualitee in #9905
- import.ps1 - Remove AlwaysBuildLibrary configuration by @potatoqualitee in #9907
- Connect-DbaInstance - Exclude ActiveConnections for SQL Server 2022+ to fix performance issue by @potatoqualitee in #9908
- Invoke-DbaAdvancedInstall - Add /q switch for Server Core compatibility by @potatoqualitee in #9898
- Add command Get-DbaAgDatabaseReplicaState as a first step for AG monitoring and health check by @andreasjordan in #9910
- Format-DbaBackupInformation - Fix cross-platform path handling for Windows to Linux restores by @potatoqualitee in #9913
- *-DbaDbTable - Add parameter aliases to standardize table name parameter by @potatoqualitee in #9912
- Get-DbaMemoryCondition - Remove outdated Microsoft KB URL reference by @potatoqualitee in #9914
- skip claude-issue* branches by @niphlod in #9920
- Export-DbaSysDbUserObject - Fix ScriptingOptionsObject parameter being ignored by @potatoqualitee in #9918
- Copy-DbaLinkedServer - Add DAC connection to prevent multiple DAC connection attempts by @andreasjordan in #9921
- Get-DbaNetworkCertificate - Fix warning parameter forwarding by @potatoqualitee in #9922
- Update-DbaInstance - Add UseSSL and Port parameters with configuration defaults by @potatoqualitee in #9923
- Copy-DbaDbTableData - Add support for ignoring computed columns by @potatoqualitee in #9915
- Add-DbaComputerCertificate - Add support for importing full certificate chain by @potatoqualitee in #9924
- Start-DbaDbEncryption, Stop-DbaDbEncryption - Add -Parallel switch for async execution by @potatoqualitee in #9916
- Remove-DbaDbUser - Fix Azure SQL Database compatibility by @potatoqualitee in #9933
- New-DbaAgent* - Add enhanced error handling for contained AG listeners by @potatoqualitee in #9925
- Copy-DbaDbTableData - Fix data ordering issue when copying tables without explicit ORDER BY by @potatoqualitee in #9927
- Add-DbaComputerCertificate, Start/Stop-DbaDbEncryption - Fix PFX certificate chain import and improve parallel encryption handling by @potatoqualitee in #9936
- Complete Pester 5 migration - Migrate final 4 meta-tests and fix duplicate test execution by @potatoqualitee in #9937
- New-DbaDbTransfer - Infer SSL/TLS settings from source connection by @potatoqualitee in #9930
- Get-DbaAgentJob, Remove-DbaAgentJob - Add validation for null/empty Job parameter by @potatoqualitee in #9931
- Get-DbaAgentJob - Optimize Database filter with hashtable lookup by @potatoqualitee in #9932
- Invoke-DbaDiagnosticQuery - Fix Azure SQL DB query execution with limited permissions by @potatoqualitee in #9917
- Copy-DbaDbMail - Fix InvalidCastException by explicitly casting SMO name properties to string by @potatoqualitee in #9926
- Sync-DbaLoginPassword - Add command to sync passwords using hashed values by @potatoqualitee in #9883
- Install-DbaMaintenanceSolution - Add backup parameters (ChangeBackupType, Compress, CopyOnly, Verify, CheckSum, ModificationLevel) by @potatoqualitee in #9939
- Tests - Filter and fix by @p...
v2.7.6
What's Changed
- Update CI skip rules and buildref index by @potatoqualitee in #9848
- New-/Get-/Remove-DbaFirewallRule: New rule for database mirroring or Availability Groups by @andreasjordan in #9846
- New-DbaAgentSchedule: Add new parameter FrequencyText by @andreasjordan in #9847
Full Changelog: v2.7.5...v2.7.6
v2.7.5
What's Changed
- gdr for november by @niphlod in #9837
- SQL Server 2022 CU 21 by @rwestMSFT in #9839
Full Changelog: v2.7.3...v2.7.5
v2.7.3
What's Changed
- More fixes to stabilize the pester 5 tests by @andreasjordan in #9813
- Some pester improvements by @andreasjordan in #9819
- Invoke-DbatoolsRenameHelper - fix command and tests by @andreasjordan in #9822
- Invoke-DbaDbDecryptObject - Support trust server certificate by using Connect-DbaInstance by @andreasjordan in #9826
- Set-FileSystemSetting - Move from WMI to CIM to support pwsh by @andreasjordan in #9820
- Enhance tests by @andreasjordan in #9825
- Added db.Refresh() to Test-DbaAvailabilityGroup by @ReeceGoding in #9812
- Refactor Filestream related tests by @andreasjordan in #9828
- Copy-DbaDbAssembly - refactor test by @andreasjordan in #9827
- Expand-DbaDbLogFile - Fix command and test by @andreasjordan in #9830
- Fix test for Copy-DbaDatabase by @andreasjordan in #9829
- Remove duplicate 'PSAvoidUsingWriteHost' rule from analyzer by @slang25 in #9834
- Copy-DbaDbCertificate - Fix command and test by @andreasjordan in #9831
- September 2025 GDR by @rwestMSFT in #9836
- Fix and enable some more tests by @andreasjordan in #9832
New Contributors
Full Changelog: v2.7.2...v2.7.3
v2.7.1
What's Changed
- Add-DbaAgDatabase: Fix spelling - use JoinAvailablityGroup with the typo as this is what the SMO uses by @andreasjordan in #9793
- Copy-DbaSystemDbUserObject - fix typo by @potatoqualitee in #9794
Full Changelog: v2.7.0...v2.7.1
v2.7.0
Named 2.7.0 due to breaking changes in DAC and XESmartTarget
The Windows/Linux/Mac SqlPackages have been removed. The size of dbatools.library grew too large (like 700mb!) because previously, I used to spend ours figuring out dependencies and this delayed library releases. Now I just include everything which is what packages usually do anyway, including SqlServer.
Export-DbaPackage relies on sqlpackage and that used to be included but it added like 500MB to the library, so now you have to install it with Install-DbaSqlPackage when you need it. Works on Windows, Mac and Linux.
I also had to remove XESmartTarget commands because the the packaging changed and I didn't have time to address it. If anyone is interested in making dbatools.xesmarttarget, we're happy to host it on the dataplat org.
What's Changed
- Refactor Get-TestConfig for safety and better readability by @andreasjordan in #9751
- Ignore docs and config changes in CI workflows by @potatoqualitee in #9752
- More tests in the new pester 5 design by @andreasjordan in #9753
- Restructure AI Automation & Pester v5 Test Migration Config by @potatoqualitee in #9754
- Availability is misspelled by @jeffw66 in #9757
- Test which tests still fail by @andreasjordan in #9765
- Fixes for a lot of tests that outputed unwanted warnings by @andreasjordan in #9764
- Refactor and enhance Pester tests batch by @potatoqualitee in #9762
- Cleanup AppVeyor configuration scripts by @andreasjordan in #9766
- Refactor and enhance Pester tests batch by @potatoqualitee in #9760
- August 2025 SQL Server GDR releases by @rwestMSFT in #9774
- Standardization of BeforeAll/AfterAll in tests by @potatoqualitee in #9781
- Move SqlPackage & XESmartTarget from bundled to installer-based dependencies by @potatoqualitee in #9776
- Fix tests that needed extra care after migration to pester 5 by @andreasjordan in #9780
- Remove XESmartTarget Commands and Fix DAC by @potatoqualitee in #9783
- Formatting tests by @andreasjordan in #9784
- Remove redundant global variable by @potatoqualitee in #9785
- More fixes for pester 5 tests focusing on parameter tests by @andreasjordan in #9787
- Save-DbaDiagnosticQueryScript - fix downloader and update files by @potatoqualitee in #9788
New Contributors
Full Changelog: v2.5.5...v2.7.0
v2.5.5
This release makes a major change to the digital signing by switching from DigiCert to Azure Trusted Signing. Read https://blog.netnerds.net/2025/08/dbatools-azure-trusted-signing/ for more.
What's Changed
- DbaDeprecatedFeature - Refactor Get- and remove Test- by @andreasjordan in #9719
- Read-DbaAuditFile / Read-DbaXEFile / Watch-DbaXESession - Refactoring and bugfixing by @andreasjordan in #9720
- Invoke-DbaDbDataGenerator - Add workaround for DateTimeReference by @andreasjordan in #9716
- Add SecureString support for AccessToken in Connect-DbaInstance by @potatoqualitee in #9722
- New-DbaConnectionString - Fix issues with parameter EncryptConnection by @andreasjordan in #9724
- Update macOS tests to work more reliably by @potatoqualitee in #9725
- Test-DbaAvailabilityGroup - Fix bug in error message by @andreasjordan in #9726
- Skip PR builds if push build exists in AppVeyor by @potatoqualitee in #9734
- constants.local.ps1.example - Fix example for defaults for $PSDefaultParameterValues by @andreasjordan in #9730
- Get-TestConfig - Added configuration for temp folder by @andreasjordan in #9728
- Get-TestConfig - Cleanup code by @andreasjordan in #9727
- Refactor the Endpoint related tests by @andreasjordan in #9732
- Get-DbaDbBackupHistory - Change warning to verbose for recovery fork message by @potatoqualitee in #9736
- Refactor the Credential related tests by @andreasjordan in #9737
- Added IsCdCEnabled to Get-DbaDatabase by @ReeceGoding in #9670
- Add Get-Runspace compatibility function for PS v3/v4 by @potatoqualitee in #9731
- Refactor some tests by @andreasjordan in #9738
- A pester 5 test as a blueprint by @andreasjordan in #9729
- Invoke-ManualPester - Fix some issues by @andreasjordan in #9739
- Fix SSIS Connection Logic by @potatoqualitee in #9743
- Rewrite test for Backup-DbaDatabase for pester 5 by @andreasjordan in #9744
- Small fixes for a lot of tests by @andreasjordan in #9746
- Fix test for Copy-DbaDbMail by @andreasjordan in #9745
- Another round of fixes for tests by @andreasjordan in #9747
Shoutout to @andreasjordan for all the PRs and fixes!
Full Changelog: v2.5.1...v2.5.5
v2.5.1
What's Changed
- Fix some tests by @andreasjordan in #9709
- Export-DbaLogin - add 2022 support by @jpomfret in #9569
- New-DbaLogin - Fix bug in PasswordMustChange by @andreasjordan in #9713
- Copy-DbaDatabase - Fix enabling broker on prefixed databases by @andreasjordan in #9714
- Update PS Requirement, CI Workflows, and Docs by @potatoqualitee in #9715
Updated dbatools.library to to handle some edge-case loading.
Full Changelog: v2.5.0...v2.5.1
v2.5.0 - Major library updates
Overview
This release updates dbatools to use the new dbatools.library v2025.7.19 and includes significant improvements to CI/CD workflows and assembly management which will make quickly addressing library dependency vulnerabilities a whole lot easier.
This release should resolve a lot of the issues we have all run into with connecting to SQL Server 2022. Newer (but not too newer) .NET versions are now required. The dbatools.library will now be pretty big because I'm including complete packages (like dac) for each OS, without trimming it. The previous trims I did kept the library small but it also kept me from releasing library updates as regularly as I'd like because it made everything hard. So, we're now at about 250mb for all the assemblies from Microsoft that we need to cover as many platforms as possible.
Thanks a hell of a lot to @niphlod who helped get this version update in motion.
Major Changes
📚 Library Update
- Updated dbatools.library dependency to v2025.7.19
- Added centralized version management via
.github/dbatools-library-version.json - Implemented dynamic library installation script for both stable and preview versions
🔒 Security Improvements
By updating to dbatools.library v2025.7.19, this PR addresses significant security vulnerabilities:
Critical Vulnerabilities Resolved
- CVE-2017-0160 (CVSS 10.0): .NET Framework remote code execution
- CVE-2018-8284 (CVSS 9.8): .NET Framework remote code execution
- CVE-2019-0613: .NET Framework XML parsing remote code execution
- CVE-2020-0646: .NET Framework input validation remote code execution
- CVE-2024-35264: Kestrel HTTP/3 data corruption remote code execution
- CVE-2024-30045: .NET Double Parse buffer overrun remote code execution
High Severity Vulnerabilities Resolved
- CVE-2024-0056 (CVSS 8.7): SQL client information disclosure via AiTM attacks
- CVE-2023-28260 (CVSS 7.8): .NET DLL hijacking vulnerability
- CVE-2023-36049: .NET FTP command injection elevation of privilege
- CVE-2024-38229: HTTP/3 use-after-free remote code execution
- CVE-2023-44487: HTTP/2 "Rapid Reset" denial of service
- CVE-2024-43485: System.Text.Json algorithmic complexity DoS
Medium Severity Vulnerabilities Resolved
- CVE-2023-36013 (CVSS 6.5): PowerShell Web cmdlets information disclosure
- CVE-2024-0057: X.509 certificate validation bypass
- CVE-2023-36558: Blazor server form validation bypass
- CVE-2024-21319: JWT authentication memory exhaustion
- CVE-2024-21386: SignalR server denial of service
- CVE-2024-38095: ASN.1 parsing excessive CPU consumption
Security Enhancements
- Assembly loading improvements prevent DLL hijacking attacks
- SQL connections now use encrypted connections by default (via DacFx)
- Enhanced credential management with Azure token support
- Improved certificate validation logic
- Removed hardcoded paths that could be exploited
Security Impact: This update resolves 30+ CVEs across all dependencies, including 6 Critical, 12 High, and 12+ Medium severity vulnerabilities.
🔄 CI/CD Improvements
- Centralized Library Version Management: All workflows now read from
dbatools-library-version.json - Preview Version Support: CI can now handle preview versions of dbatools.library
- Dynamic Installation: New
install-dbatools-library.ps1script handles version detection and installation - Improved Test Scripts: Moved test scripts to
.github/scripts/for better organization
🏗️ Assembly & Platform Updates
- Updated sqlpackage paths to use new dac folder structure:
- Windows:
lib/dac/windows/sqlpackage.exe - Linux:
lib/dac/linux/sqlpackage - macOS:
lib/dac/mac/sqlpackage
- Windows:
- Enhanced
Get-DbaManagementObjectto better handle:- Loaded assemblies detection
- SNI module tracking
- Cross-platform assembly resolution
- Added support for SQL Server 2025 instance detection
🔧 Export-DbaDacPackage Improvements
- Updated sqlpackage path resolution for new directory structure
- Better cross-platform path handling
- Distinction between Core and Desktop paths on Windows
📋 Version Management Documentation
Added comprehensive version management guide (.github/DBATOOLS_LIBRARY_VERSION_MANAGEMENT.md) covering:
- Version update procedures
- Testing requirements
- Rollback procedures
- CI/CD pipeline usage
🧪 Testing Enhancements
- Added SQL Server engine installation to Windows tests (not just LocalDB)
- Improved credential handling for SQL Server connections
- Better error messages for assembly loading issues
- Enhanced copyright compliance in web search functionality
Non-Breaking Changes
- All changes maintain backwards compatibility
- Existing scripts and modules will continue to work
- Version management is transparent to end users
Testing Checklist
- Verified module imports successfully on Windows PowerShell 5.1
- Verified module imports successfully on PowerShell 7.4+
- Integration tests pass on all platforms
- Gallery installation tests pass
- Replication tests pass (when fixed)
- Assembly loading diagnostics show correct versions
Related PRs
- Requires dbatools.library PR dataplat/dbatools.library#18
Notes
- Some replication tests are currently disabled pending fixes
- The library version can be updated by modifying
.github/dbatools-library-version.json
v2.1.32
What's Changed
- Update dbatools-buildref-index.json SQL 2022 CU19 by @MikeyBronowski in #9676
- Export-DbaDbTableData, changed examples to make them usable by @niphlod in #9677
- Get-DbatoolsChangelog, direct to the "correct" page by @niphlod in #9678
- New-DbaDbSnapshot: Add Basic Availability Group Support by @ReeceGoding in #9632
- support lower-than-2012 instances (using RAISERROR instead of THROW) by @niphlod in #9659
- Get-DbaAgDatabase: Fix example by @andreasjordan in #9683
- Invoke-DbaDbDataMasking - fix up decimal & bit support by @AdamJKoehler in #9664
- Set-DbaAgentJobOutputFile: Made it more clear that the Job and Step parameters expect names. by @ReeceGoding in #9675
- Enable-DbaReplPublishing, fix example by @niphlod in #9660
- Connect-DbaInstance / Invoke-DbaQuery - Open a correct new connection when ConnectAsUserName is used and fix usage of AppendConnectionString by @andreasjordan in #9680
- Added table schema to Get-DbaDbForeignKey by @pollusb in #9685
- July 2025 GDR by @rwestMSFT in #9703
- 2022 CU 20 by @rwestMSFT in #9705
- Remove-DbaDbOrphanUser, avoid readonly dbs by @potatoqualitee in #9704
- Remove-DbaDatabaseSafely and Remove-DbaDatabase: added "Name" as an alias for "Database" by @ReeceGoding in #9698
Full Changelog: v2.1.31...v2.1.32