commands

^

Install-DbaFirstResponderKit

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.

Synopsis

Installs or updates the First Responder Kit stored procedures.

Description

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

Syntax

Install-DbaFirstResponderKit
    [-SqlInstance] <DbaInstanceParameter[]>
    [[-SqlCredential] <PSCredential>]
    [[-Branch] <String>]
    [[-Database] <Object>]
    [[-LocalFile] <String>]
    [[-OnlyScript] <String[]>]
    [-Force]
    [-EnableException]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

 

Examples

 

Example: 1
PS C:\> Install-DbaFirstResponderKit -SqlInstance server1 -Database master

Logs into server1 with Windows authentication and then installs the FRK in the master database.

Example: 2
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.

Example: 3
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.

Example: 4
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.

Example: 5
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.

Example: 6
PS C:\> Install-DbaFirstResponderKit -SqlInstance sql2016 -Branch dev

Installs the dev branch version of the FRK in the master database on sql2016 instance.

Example: 7
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.

Example: 8
PS C:\> Install-DbaFirstResponderKit -SqlInstance sql2016 -OnlyScript Install-Core-Blitz-No-Query-Store.sql

Installs only part of the First Responder Kit by running the official install script.

Example: 9
PS C:\> Install-DbaFirstResponderKit -SqlInstance sql2016 -OnlyScript Uninstall.sql

Uninstalls the First Responder Kit by running the official uninstall script.

Required Parameters

-SqlInstance

The target SQL Server instance or instances.

Alias
Required True
Pipeline true (ByValue)
Default Value

Optional Parameters

-SqlCredential

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
-Branch

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
-Database

Specifies the database to install the First Responder Kit stored procedures into

Alias
Required False
Pipeline false
Default Value master
-LocalFile

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
-OnlyScript

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-Core-Blitz-No-Query-Store.sql,Install-Core-Blitz-With-Query-Store.sql,sp_Blitz.sql,sp_BlitzFirst.sql,sp_BlitzIndex.sql,sp_BlitzCache.sql,sp_BlitzWho.sql,sp_BlitzQueryStore.sql,sp_BlitzAnalysis.sql,sp_BlitzBackups.sql,sp_BlitzInMemoryOLTP.sql,sp_BlitzLock.sql,sp_AllNightLog.sql,sp_AllNightLog_Setup.sql,sp_DatabaseRestore.sql,sp_ineachdb.sql,SqlServerVersions.sql,Uninstall.sql
-Force

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
-EnableException

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
-WhatIf

Shows what would happen if the command were to run. No actions are actually performed.

Alias wi
Required False
Pipeline false
Default Value
-Confirm

Prompts to confirm actions

Alias cf
Required False
Pipeline false
Default Value