Export-DbaDacPackage View Source Richie lee (@richiebzzzt) Windows, Linux, macOS Synopsis Creates DACPAC or BACPAC deployment packages from SQL Server databases using SqlPackage
Description Creates database deployment packages for version control, migrations, and schema distribution. Generates DACPAC files containing database schema definitions or BACPAC files that include both schema and data. This automates the SqlPackage utility so you don’t have to remember complex command-line syntax or manage connection strings manually.
Get-DbaInstalledPatch View Source Hiram Fleitas, @hiramfleitas, fleitasarts.com Windows, Linux, macOS Synopsis Retrieves installed SQL Server patches from Windows Registry for patch compliance and audit reporting.
Description Queries the Windows Registry to retrieve a complete history of SQL Server patches installed on one or more computers. This includes Cumulative Updates (CUs), Service Packs, and Hotfixes that have been applied to any SQL Server instance on the target machines.
Essential for patch compliance audits, pre-upgrade planning, and troubleshooting environments where you need to verify what patches have been installed and when.
Get-DbaKbUpdate View Source Chrissy LeMaire (@cl), netnerds.net Windows, Linux, macOS Synopsis Retrieves detailed metadata and download links for Microsoft KB updates from the update catalog
Description Searches Microsoft’s update catalog website to retrieve comprehensive information about KB updates including service packs, hotfixes, and cumulative updates. Returns detailed metadata such as supported products, architecture, language, file size, supersession information, and direct download links. Integrates with Get-DbaBuild to provide SQL Server-specific versioning details when available, making it essential for patch management and update research workflows.
Install-DbaInstance View Source Reitse Eskens (@2meterDBA), Kirill Kravtsov (@nvarscar) Windows, Linux, macOS Synopsis Automates SQL Server instance installation across local and remote computers with customizable configuration.
Description Orchestrates unattended SQL Server installations by generating configuration files and executing setup.exe remotely or locally. Automates the tedious process of creating proper configuration.ini files, handling service accounts, and managing installation prerequisites like pending reboots and authentication protocols.
The function dynamically builds installation configurations based on your parameters, automatically configures optimal settings like tempdb file counts based on CPU cores (SQL 2016+), and handles authentication scenarios including CredSSP for network installations.
Install-DbaSqlPackage View Source Chrissy LeMaire and Claude Windows, Linux, macOS Synopsis Installs Microsoft SqlPackage utility required for database deployment and DACPAC operations
Description Downloads and installs Microsoft SqlPackage utility, which is essential for database deployment automation and DACPAC operations. This prerequisite tool enables you to use Import-DbaDacpac, Export-DbaDacpac, Publish-DbaDacpac and Get-DbaDacpac for automated database schema deployments and CI/CD pipelines.
SqlPackage is Microsoft’s command-line utility for deploying database schema changes, extracting database schemas to DACPAC files, and publishing changes across environments.
Invoke-DbaAdvancedInstall View Source Chrissy LeMaire (@cl), netnerds.net Windows, Linux, macOS Synopsis Executes SQL Server installation on a single computer with automated restart handling.
Description Performs the complete SQL Server installation workflow on a target computer, including pre and post-installation restart management. This internal function handles copying configuration files to remote machines, executing setup.exe with specified parameters, configuring TCP ports, enabling volume maintenance tasks, and managing required system restarts. It provides detailed installation logging and error reporting to track the success or failure of each installation attempt.
Invoke-DbaAdvancedUpdate View Source Kirill Kravtsov (@nvarscar) Windows, Linux, macOS Synopsis Installs SQL Server updates and patches on remote computers with automatic restart management
Description Executes SQL Server KB updates on a target computer by extracting patch files, running setup.exe with appropriate parameters, and managing system restarts as needed. This function handles the core installation logic for Update-DbaInstance, processing update actions for specific SQL Server instances or all instances on a machine.
New-DbaDacOption View Source Kirill Kravtsov (@nvarscar), nvarscar.wordpress.com Windows, Linux, macOS Synopsis Creates a new Microsoft.SqlServer.Dac.DacExtractOptions/DacExportOptions object depending on the chosen Type
Description Creates a new Microsoft.SqlServer.Dac.DacExtractOptions/DacExportOptions object that can be used during DacPackage extract. Basically saves you the time from remembering the SMO assembly name ;)
See:
https://msdn.microsoft.com/en-us/library/microsoft.sqlserver.dac.dacexportoptions.aspx
https://msdn.microsoft.com/en-us/library/microsoft.sqlserver.dac.dacextractoptions.aspx
for more information
Syntax New-DbaDacOption [[-Type] <String>] [-Action] <String> [[-PublishXml] <String>] [[-Property] <Hashtable>] [-EnableException] [-WhatIf] [-Confirm] [<CommonParameters>] Examples Example: 1 PS C:\> $options = New-DbaDacOption -Type Dacpac -Action Export PS C:\> $options.
New-DbaDacProfile View Source Richie lee (@richiebzzzt) Windows, Linux, macOS Synopsis Creates DAC publish profile XML files for automated dacpac deployment to SQL Server databases.
Description The New-DbaDacProfile command generates standard publish profile XML files that control how DacFx deploys your dacpac files to SQL Server databases. These profile files define deployment settings like target database, connection details, and deployment options.
The generated XML template includes basic deployment settings sufficient for most dacpac deployments, but you’ll typically want to add additional deployment options to the publish profile for production scenarios.
Publish-DbaDacPackage View Source Richie lee (@richiebzzzt) Windows, Linux, macOS Synopsis Deploys DACPAC or BACPAC files to SQL Server databases using the DacFx framework
Description Deploys database schema changes from DACPAC files created by SSDT projects or Export-DbaDacPackage, automatically updating target database structure and executing embedded pre/post deployment scripts. Also imports data from BACPAC files for complete database restoration scenarios. This replaces manual schema synchronization and deployment processes, making it essential for CI/CD pipelines and environment promotions.