Author | Chrissy LeMaire and Claude |
Availability | Windows, Linux, macOS |
Want to see the source code for this command? Check out Install-DbaSqlPackage on GitHub.
Want to see the Bill Of Health for this command? Check out Install-DbaSqlPackage.
Downloads and installs SqlPackage on Windows, Linux, or macOS
Downloads and installs SqlPackage so that you can use Import-DbaDacpac, Export-DbaDacpac, Publish-DbaDacpac and Get-DbaDacpac.
Cross-platform support:
By default, SqlPackage is installed as a portable ZIP file to the dbatools directory for CurrentUser scope.
For AllUsers (LocalMachine) scope on Windows, you can use the MSI installer which requires administrative privileges.
Writes to $script:PSModuleRoot\bin\sqlpackage by default for CurrentUser scope.
Install-DbaSqlPackage
[[-Path] <String>]
[[-Scope] <String>]
[[-Type] <String>]
[[-LocalFile] <String>]
[-Force]
[-EnableException]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
PS C:\> Install-DbaSqlPackage
Downloads SqlPackage ZIP to the dbatools directory for the current user
PS C:\> Install-DbaSqlPackage -Scope AllUsers -Type Msi
Downloads and installs SqlPackage MSI for all users (requires administrative privileges)
PS C:\> Install-DbaSqlPackage -Path C:\SqlPackage
Downloads SqlPackage ZIP to C:\SqlPackage
PS C:\> Install-DbaSqlPackage -LocalFile C:\temp\sqlpackage.zip
Installs SqlPackage from the local ZIP file.
Specifies the path where SqlPackage will be extracted or installed.
If not specified, SqlPackage will be installed to the dbatools directory for CurrentUser scope.
Alias | |
Required | False |
Pipeline | false |
Default Value |
Specifies the installation scope. Valid values are:
Alias | |
Required | False |
Pipeline | false |
Default Value | CurrentUser |
Accepted Values | CurrentUser,AllUsers |
Specifies the installation type. Valid values are:
Alias | |
Required | False |
Pipeline | false |
Default Value | Zip |
Accepted Values | Zip,Msi |
Specifies the path to a local file to install SqlPackage from. This file should be an msi or zip file.
Alias | |
Required | False |
Pipeline | false |
Default Value |
If this switch is enabled, the Sqlpackage will be downloaded from the internet even if previously cached.
Alias | |
Required | False |
Pipeline | false |
Default Value | False |
By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message.
This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting.
Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.
Alias | |
Required | False |
Pipeline | false |
Default Value | False |
If this switch is enabled, no actions are performed but informational messages will be displayed that explain what would happen if the command were to run.
Alias | wi |
Required | False |
Pipeline | false |
Default Value |
If this switch is enabled, you will be prompted for confirmation before executing any operations that change state.
Alias | cf |
Required | False |
Pipeline | false |
Default Value |