Author | Tara Kizer, Brent Ozar Unlimited (brentozar.com) |
Availability | Windows, Linux, macOS |
Want to see the source code for this command? Check out Install-DbaFirstResponderKit on GitHub.
Want to see the Bill Of Health for this command? Check out Install-DbaFirstResponderKit.
Installs or updates the First Responder Kit stored procedures.
Downloads, extracts and installs the First Responder Kit stored procedures
First Responder Kit links:
http://FirstResponderKit.org
https://github.com/BrentOzarULTD/SQL-Server-First-Responder-Kit
Install-DbaFirstResponderKit
[-SqlInstance] <DbaInstanceParameter[]>
[[-SqlCredential] <PSCredential>]
[[-Branch] <String>]
[[-Database] <Object>]
[[-LocalFile] <String>]
[[-OnlyScript] <String[]>]
[-Force]
[-EnableException]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
PS C:\> Install-DbaFirstResponderKit -SqlInstance server1 -Database master
Logs into server1 with Windows authentication and then installs the FRK in the master database.
PS C:\> Install-DbaFirstResponderKit -SqlInstance server1\instance1 -Database DBA
Logs into server1\instance1 with Windows authentication and then installs the FRK in the DBA database.
PS C:\> Install-DbaFirstResponderKit -SqlInstance server1\instance1 -Database master -SqlCredential $cred
Logs into server1\instance1 with SQL authentication and then installs the FRK in the master database.
PS C:\> Install-DbaFirstResponderKit -SqlInstance sql2016\standardrtm, sql2016\sqlexpress, sql2014
Logs into sql2016\standardrtm, sql2016\sqlexpress and sql2014 with Windows authentication and then installs the FRK in the master database.
PS C:\> $servers = "sql2016\standardrtm", "sql2016\sqlexpress", "sql2014"
PS C:\> $servers | Install-DbaFirstResponderKit
Logs into sql2016\standardrtm, sql2016\sqlexpress and sql2014 with Windows authentication and then installs the FRK in the master database.
PS C:\> Install-DbaFirstResponderKit -SqlInstance sql2016 -Branch dev
Installs the dev branch version of the FRK in the master database on sql2016 instance.
PS C:\> Install-DbaFirstResponderKit -SqlInstance sql2016 -OnlyScript sp_Blitz.sql, sp_BlitzWho.sql, SqlServerVersions.sql
Installs only the procedures sp_Blitz and sp_BlitzWho and the table SqlServerVersions by running the corresponding scripts.
PS C:\> Install-DbaFirstResponderKit -SqlInstance sql2016 -OnlyScript Install-All-Scripts.sql
Installs the First Responder Kit using the official install script.
PS C:\> Install-DbaFirstResponderKit -SqlInstance sql-server-001.database.windows.net -OnlyScript Install-Azure.sql
Installs the First Responder Kit using the official install script for Azure SQL Database.
PS C:\> Install-DbaFirstResponderKit -SqlInstance sql2016 -OnlyScript Uninstall.sql
Uninstalls the First Responder Kit by running the official uninstall script.
The target SQL Server instance or instances.
Alias | |
Required | True |
Pipeline | true (ByValue) |
Default Value |
Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential).
Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported.
For MFA support, please use Connect-DbaInstance.
Alias | |
Required | False |
Pipeline | false |
Default Value |
Specifies an alternate branch of the First Responder Kit to install.
Allowed values:
main (default)
dev
Alias | |
Required | False |
Pipeline | false |
Default Value | main |
Accepted Values | main,dev |
Specifies the database to install the First Responder Kit stored procedures into
Alias | |
Required | False |
Pipeline | false |
Default Value | master |
Specifies the path to a local file to install FRK from. This should be the zip file as distributed by the maintainers.
If this parameter is not specified, the latest version will be downloaded and installed from https://github.com/BrentOzarULTD/SQL-Server-First-Responder-Kit
Alias | |
Required | False |
Pipeline | false |
Default Value |
Specifies the name(s) of the script(s) to run for installation. Wildcards are permitted.
This way only part of the First Responder Kit can be installed.
Using one of the three official Install-* scripts (Install-All-Scripts.sql, Install-Core-Blitz-No-Query-Store.sql, Install-Core-Blitz-With-Query-Store.sql) is possible this way.
Even removing the First Responder Kit is possible by using the official Uninstall.sql.
Alias | |
Required | False |
Pipeline | false |
Default Value | |
Accepted Values | Install-All-Scripts.sql,Install-Azure.sql,sp_Blitz.sql,sp_BlitzFirst.sql,sp_BlitzIndex.sql,sp_BlitzCache.sql,sp_BlitzWho.sql,sp_BlitzAnalysis.sql,sp_BlitzBackups.sql,sp_BlitzLock.sql,sp_DatabaseRestore.sql,sp_ineachdb.sql,SqlServerVersions.sql,Uninstall.sql |
If this switch is enabled, the FRK 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 |
Shows what would happen if the command were to run. No actions are actually performed.
Alias | wi |
Required | False |
Pipeline | false |
Default Value |
Prompts to confirm actions
Alias | cf |
Required | False |
Pipeline | false |
Default Value |