commands

^

Invoke-DbaAdvancedInstall

Author Chrissy LeMaire (@cl), netnerds.net
Availability Windows, Linux, macOS

 

Want to see the source code for this command? Check out Invoke-DbaAdvancedInstall on GitHub.
Want to see the Bill Of Health for this command? Check out Invoke-DbaAdvancedInstall.

Synopsis

Designed for internal use, implements parallel execution for Install-DbaInstance.

Description

Invokes an install process for a single computer and restarts it if needed

Syntax

Invoke-DbaAdvancedInstall
    [[-ComputerName] <String>]
    [[-InstanceName] <String>]
    [[-Port] <Nullable`1>]
    [[-InstallationPath] <String>]
    [[-ConfigurationPath] <String>]
    [[-ArgumentList] <String[]>]
    [[-Version] <Version>]
    [[-Configuration] <Hashtable>]
    [[-Restart] <Boolean>]
    [[-PerformVolumeMaintenanceTasks] <Boolean>]
    [[-SaveConfiguration] <String>]
    [[-Authentication] <String>]
    [[-Credential] <PSCredential>]
    [[-SaCredential] <PSCredential>]
    [-NoPendingRenameCheck]
    [-EnableException]
    [<CommonParameters>]

 

Examples

 

Example: 1
PS C:\> Invoke-DbaAdvancedUpdate -ComputerName SQL1 -Action $actions

Invokes update actions on SQL1 after restarting it.

Optional Parameters

-ComputerName

Target computer with SQL instance or instances.

Alias
Required False
Pipeline false
Default Value
-InstanceName

Instance name to be used for the installation

Alias
Required False
Pipeline false
Default Value
-Port

After successful installation, changes SQL Server TCP port to this value. Overrides the port specified in -SqlInstance.

Alias
Required False
Pipeline false
Default Value
-InstallationPath

Path to setup.exe

Alias
Required False
Pipeline false
Default Value
-ConfigurationPath

Path to Configuration.ini on a local machine

Alias
Required False
Pipeline false
Default Value
-ArgumentList

Array of command line arguments for setup.exe

Alias
Required False
Pipeline false
Default Value
-Version

Canonic version of SQL Server, e.g. 10.50, 11.0

Alias
Required False
Pipeline false
Default Value
-Configuration

A hashtable with custom configuration items that you want to use during the installation.
Overrides all other parameters.
For example, to define a custom server collation you can use the following parameter:
PS> Install-DbaInstance -Version 2017 -Configuration @
Full list of parameters can be found here: https://docs.microsoft.com/en-us/sql/database-engine/install-windows/install-sql-server-from-the-command-prompt#Install

Alias
Required False
Pipeline false
Default Value
-Restart

Restart computer automatically after a successful installation of Sql Server and wait until it comes back online.
Using this parameter is the only way to chain-install more than 1 instance, since every single patch will require a restart of said computer.

Alias
Required False
Pipeline false
Default Value False
-PerformVolumeMaintenanceTasks

Allow SQL Server service account to perform Volume Maintenance tasks.

Alias
Required False
Pipeline false
Default Value False
-SaveConfiguration

Save installation configuration file in a custom location. Will not be preserved otherwise.

Alias
Required False
Pipeline false
Default Value
-Authentication

Chooses an authentication protocol for remote connections.
If the protocol fails to establish a connection
Defaults:

  • CredSSP when -Credential is specified - due to the fact that repository Path is usually a network share and credentials need to be passed to the remote host to avoid the double-hop issue.
  • Default when -Credential is not specified. Will likely fail if a network path is specified.
Alias
Required False
Pipeline false
Default Value Credssp
Accepted Values Default,Basic,Negotiate,NegotiateWithImplicitCredential,Credssp,Digest,Kerberos
-Credential

Windows Credential with permission to log on to the remote server.
Must be specified for any remote connection if installation media is located on a network folder.

Alias
Required False
Pipeline false
Default Value
-SaCredential

Securely provide the password for the sa account when using mixed mode authentication.

Alias
Required False
Pipeline false
Default Value
-NoPendingRenameCheck

Disables pending rename validation when checking for a pending reboot.

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