Skip to content

Install SqlDscServer

dscbot edited this page Mar 3, 2024 · 2 revisions

Install-SqlDscServer

SYNOPSIS

Executes an setup action using Microsoft SQL Server setup executable.

SYNTAX

InstallAzureArcAgent

Install-SqlDscServer [-Install] [-AcceptLicensingTerms] -MediaPath <String> -AzureSubscriptionId <String>
 -AzureResourceGroup <String> -AzureRegion <String> -AzureTenantId <String> -AzureServicePrincipal <String>
 -AzureServicePrincipalSecret <SecureString> [-AzureArcProxy <String>] [-Timeout <UInt32>] [-Force]
 [-WhatIf] [-Confirm] [<CommonParameters>]

InstallRole

Install-SqlDscServer [-Install] [-AcceptLicensingTerms] [-SuppressPrivacyStatementNotice]
 [-IAcknowledgeEntCalLimits] -MediaPath <String> [-InstanceName <String>] [-Enu] [-UpdateEnabled]
 [-UpdateSource <String>] [-Features <String[]>] -Role <String> [-InstallSharedDir <String>]
 [-InstallSharedWowDir <String>] [-InstanceDir <String>] [-InstanceId <String>] [-PBEngSvcAccount <String>]
 [-PBEngSvcPassword <SecureString>] [-PBEngSvcStartupType <String>] [-PBDMSSvcAccount <String>]
 [-PBDMSSvcPassword <SecureString>] [-PBDMSSvcStartupType <String>] [-PBStartPortRange <UInt16>]
 [-PBEndPortRange <UInt16>] [-PBScaleOut] [-ProductKey <String>] [-AgtSvcAccount <String>]
 [-AgtSvcPassword <SecureString>] [-AgtSvcStartupType <String>] [-ASBackupDir <String>] [-ASCollation <String>]
 [-ASConfigDir <String>] [-ASDataDir <String>] [-ASLogDir <String>] [-ASTempDir <String>]
 [-ASServerMode <String>] [-ASSvcAccount <String>] [-ASSvcPassword <SecureString>] [-ASSvcStartupType <String>]
 [-ASSysAdminAccounts <String[]>] [-ASProviderMSOLAP] [-FarmAccount <String>] [-FarmPassword <SecureString>]
 [-Passphrase <SecureString>] [-FarmAdminiPort <UInt16>] [-BrowserSvcStartupType <String>] [-EnableRanU]
 [-InstallSqlDataDir <String>] [-SqlBackupDir <String>] [-SecurityMode <String>] [-SAPwd <SecureString>]
 [-SqlCollation <String>] [-AddCurrentUserAsSqlAdmin] [-SqlSvcAccount <String>]
 [-SqlSvcPassword <SecureString>] [-SqlSvcStartupType <String>] [-SqlSysAdminAccounts <String[]>]
 [-SqlTempDbDir <String>] [-SqlTempDbLogDir <String>] [-SqlTempDbFileCount <UInt16>]
 [-SqlTempDbFileSize <UInt16>] [-SqlTempDbFileGrowth <UInt16>] [-SqlTempDbLogFileSize <UInt16>]
 [-SqlTempDbLogFileGrowth <UInt16>] [-SqlUserDbDir <String>] [-SqlSvcInstantFileInit]
 [-SqlUserDbLogDir <String>] [-SqlMaxDop <UInt16>] [-UseSqlRecommendedMemoryLimits] [-SqlMinMemory <UInt32>]
 [-SqlMaxMemory <UInt32>] [-FileStreamLevel <UInt16>] [-FileStreamShareName <String>] [-ISSvcAccount <String>]
 [-ISSvcPassword <SecureString>] [-ISSvcStartupType <String>] [-NpEnabled] [-TcpEnabled]
 [-RsInstallMode <String>] [-RSSvcAccount <String>] [-RSSvcPassword <SecureString>]
 [-RSSvcStartupType <String>] [-MPYCacheDirectory <String>] [-MRCacheDirectory <String>] [-SqlInstJava]
 [-SqlJavaDir <String>] [-AzureSubscriptionId <String>] [-AzureResourceGroup <String>] [-AzureRegion <String>]
 [-AzureTenantId <String>] [-AzureServicePrincipal <String>] [-AzureServicePrincipalSecret <SecureString>]
 [-AzureArcProxy <String>] [-SkipRules <String[]>] [-ProductCoveredBySA] [-Timeout <UInt32>] [-Force]
 [-WhatIf] [-Confirm] [<CommonParameters>]

Install

Install-SqlDscServer [-Install] [-AcceptLicensingTerms] [-SuppressPrivacyStatementNotice]
 [-IAcknowledgeEntCalLimits] -MediaPath <String> -InstanceName <String> [-Enu] [-UpdateEnabled]
 [-UpdateSource <String>] -Features <String[]> [-InstallSharedDir <String>] [-InstallSharedWowDir <String>]
 [-InstanceDir <String>] [-InstanceId <String>] [-PBEngSvcAccount <String>] [-PBEngSvcPassword <SecureString>]
 [-PBEngSvcStartupType <String>] [-PBDMSSvcAccount <String>] [-PBDMSSvcPassword <SecureString>]
 [-PBDMSSvcStartupType <String>] [-PBStartPortRange <UInt16>] [-PBEndPortRange <UInt16>] [-PBScaleOut]
 [-ProductKey <String>] [-AgtSvcAccount <String>] [-AgtSvcPassword <SecureString>]
 [-AgtSvcStartupType <String>] [-ASBackupDir <String>] [-ASCollation <String>] [-ASConfigDir <String>]
 [-ASDataDir <String>] [-ASLogDir <String>] [-ASTempDir <String>] [-ASServerMode <String>]
 [-ASSvcAccount <String>] [-ASSvcPassword <SecureString>] [-ASSvcStartupType <String>]
 [-ASSysAdminAccounts <String[]>] [-ASProviderMSOLAP] [-BrowserSvcStartupType <String>] [-EnableRanU]
 [-InstallSqlDataDir <String>] [-SqlBackupDir <String>] [-SecurityMode <String>] [-SAPwd <SecureString>]
 [-SqlCollation <String>] [-SqlSvcAccount <String>] [-SqlSvcPassword <SecureString>]
 [-SqlSvcStartupType <String>] [-SqlSysAdminAccounts <String[]>] [-SqlTempDbDir <String>]
 [-SqlTempDbLogDir <String>] [-SqlTempDbFileCount <UInt16>] [-SqlTempDbFileSize <UInt16>]
 [-SqlTempDbFileGrowth <UInt16>] [-SqlTempDbLogFileSize <UInt16>] [-SqlTempDbLogFileGrowth <UInt16>]
 [-SqlUserDbDir <String>] [-SqlSvcInstantFileInit] [-SqlUserDbLogDir <String>] [-SqlMaxDop <UInt16>]
 [-UseSqlRecommendedMemoryLimits] [-SqlMinMemory <UInt32>] [-SqlMaxMemory <UInt32>] [-FileStreamLevel <UInt16>]
 [-FileStreamShareName <String>] [-ISSvcAccount <String>] [-ISSvcPassword <SecureString>]
 [-ISSvcStartupType <String>] [-NpEnabled] [-TcpEnabled] [-RsInstallMode <String>] [-RSSvcAccount <String>]
 [-RSSvcPassword <SecureString>] [-RSSvcStartupType <String>] [-MPYCacheDirectory <String>]
 [-MRCacheDirectory <String>] [-SqlInstJava] [-SqlJavaDir <String>] [-AzureSubscriptionId <String>]
 [-AzureResourceGroup <String>] [-AzureRegion <String>] [-AzureTenantId <String>]
 [-AzureServicePrincipal <String>] [-AzureServicePrincipalSecret <SecureString>] [-AzureArcProxy <String>]
 [-SkipRules <String[]>] [-ProductCoveredBySA] [-Timeout <UInt32>] [-Force]
 [-WhatIf] [-Confirm] [<CommonParameters>]

PrepareImage

Install-SqlDscServer [-PrepareImage] [-AcceptLicensingTerms] [-IAcknowledgeEntCalLimits] -MediaPath <String>
 [-Enu] [-UpdateEnabled] [-UpdateSource <String>] -Features <String[]> [-InstallSharedDir <String>]
 [-InstanceDir <String>] -InstanceId <String> [-PBEngSvcAccount <String>] [-PBEngSvcPassword <SecureString>]
 [-PBEngSvcStartupType <String>] [-PBStartPortRange <UInt16>] [-PBEndPortRange <UInt16>] [-PBScaleOut]
 [-Timeout <UInt32>] [-Force] [-WhatIf] [-Confirm] [<CommonParameters>]

Upgrade

Install-SqlDscServer [-Upgrade] [-AcceptLicensingTerms] -MediaPath <String> -InstanceName <String> [-Enu]
 [-UpdateEnabled] [-UpdateSource <String>] [-InstanceDir <String>] [-InstanceId <String>]
 [-ProductKey <String>] [-BrowserSvcStartupType <String>] [-FTUpgradeOption <String>] [-ISSvcAccount <String>]
 [-ISSvcPassword <SecureString>] [-ISSvcStartupType <String>] [-AllowUpgradeForSSRSSharePointMode]
 [-FailoverClusterRollOwnership <UInt16>] [-ProductCoveredBySA] [-Timeout <UInt32>] [-Force]
 [-WhatIf] [-Confirm] [<CommonParameters>]

EditionUpgrade

Install-SqlDscServer [-EditionUpgrade] [-AcceptLicensingTerms] -MediaPath <String> -InstanceName <String>
 -ProductKey <String> [-SkipRules <String[]>] [-ProductCoveredBySA] [-Timeout <UInt32>] [-Force]
 [-WhatIf] [-Confirm] [<CommonParameters>]

InstallFailoverCluster

Install-SqlDscServer [-InstallFailoverCluster] [-AcceptLicensingTerms] [-IAcknowledgeEntCalLimits]
 -MediaPath <String> -InstanceName <String> [-Enu] [-UpdateEnabled] [-UpdateSource <String>]
 -Features <String[]> [-InstallSharedDir <String>] [-InstallSharedWowDir <String>] [-InstanceDir <String>]
 [-InstanceId <String>] [-PBEngSvcAccount <String>] [-PBEngSvcPassword <SecureString>]
 [-PBEngSvcStartupType <String>] [-PBStartPortRange <UInt16>] [-PBEndPortRange <UInt16>] [-PBScaleOut]
 [-ProductKey <String>] [-AgtSvcAccount <String>] [-AgtSvcPassword <SecureString>] [-ASBackupDir <String>]
 [-ASCollation <String>] [-ASConfigDir <String>] [-ASDataDir <String>] [-ASLogDir <String>]
 [-ASTempDir <String>] [-ASServerMode <String>] [-ASSvcAccount <String>] [-ASSvcPassword <SecureString>]
 [-ASSvcStartupType <String>] [-ASSysAdminAccounts <String[]>] [-ASProviderMSOLAP] -InstallSqlDataDir <String>
 [-SqlBackupDir <String>] [-SecurityMode <String>] [-SAPwd <SecureString>] [-SqlCollation <String>]
 [-SqlSvcAccount <String>] [-SqlSvcPassword <SecureString>] [-SqlSvcStartupType <String>]
 -SqlSysAdminAccounts <String[]> [-SqlTempDbDir <String>] [-SqlTempDbLogDir <String>]
 [-SqlTempDbFileCount <UInt16>] [-SqlTempDbFileSize <UInt16>] [-SqlTempDbFileGrowth <UInt16>]
 [-SqlTempDbLogFileSize <UInt16>] [-SqlTempDbLogFileGrowth <UInt16>] [-SqlUserDbDir <String>]
 [-SqlUserDbLogDir <String>] [-FileStreamLevel <UInt16>] [-FileStreamShareName <String>]
 [-ISSvcAccount <String>] [-ISSvcPassword <SecureString>] [-ISSvcStartupType <String>]
 [-RsInstallMode <String>] [-RSSvcAccount <String>] [-RSSvcPassword <SecureString>]
 [-RSSvcStartupType <String>] [-FailoverClusterGroup <String>] [-FailoverClusterDisks <String[]>]
 -FailoverClusterNetworkName <String> -FailoverClusterIPAddresses <String[]> [-SkipRules <String[]>]
 [-ProductCoveredBySA] [-Timeout <UInt32>] [-Force] [-WhatIf] [-Confirm]
 [<CommonParameters>]

PrepareFailoverCluster

Install-SqlDscServer [-PrepareFailoverCluster] [-AcceptLicensingTerms] [-IAcknowledgeEntCalLimits]
 -MediaPath <String> -InstanceName <String> [-Enu] [-UpdateEnabled] [-UpdateSource <String>]
 -Features <String[]> [-InstallSharedDir <String>] [-InstallSharedWowDir <String>] [-InstanceDir <String>]
 [-InstanceId <String>] [-PBEngSvcAccount <String>] [-PBEngSvcPassword <SecureString>]
 [-PBEngSvcStartupType <String>] [-PBStartPortRange <UInt16>] [-PBEndPortRange <UInt16>] [-PBScaleOut]
 [-ProductKey <String>] [-AgtSvcAccount <String>] [-AgtSvcPassword <SecureString>] [-ASSvcAccount <String>]
 [-ASSvcPassword <SecureString>] [-SqlSvcAccount <String>] [-SqlSvcPassword <SecureString>]
 [-FileStreamLevel <UInt16>] [-FileStreamShareName <String>] [-ISSvcAccount <String>]
 [-ISSvcPassword <SecureString>] [-ISSvcStartupType <String>] [-RsInstallMode <String>]
 [-RSSvcAccount <String>] [-RSSvcPassword <SecureString>] [-RSSvcStartupType <String>] [-ProductCoveredBySA]
 [-Timeout <UInt32>] [-Force] [-WhatIf] [-Confirm] [<CommonParameters>]

UsingConfigurationFile

Install-SqlDscServer -ConfigurationFile <String> -MediaPath <String> [-AgtSvcPassword <SecureString>]
 [-ASSvcPassword <SecureString>] [-SqlSvcPassword <SecureString>] [-ISSvcPassword <SecureString>]
 [-RSSvcPassword <SecureString>] [-Timeout <UInt32>] [-Force] [-WhatIf]
 [-Confirm] [<CommonParameters>]

DESCRIPTION

Executes an setup action using Microsoft SQL Server setup executable.

See the link in the commands help for information on each parameter. The link points to SQL Server command line setup documentation.

EXAMPLES

EXAMPLE 1

Install-SqlDscServer -Install -AcceptLicensingTerms -InstanceName 'MyInstance' -Features 'SQLENGINE' -SqlSysAdminAccounts @('MyAdminAccount') -MediaPath 'E:\'

Installs the database engine for the named instance MyInstance.

EXAMPLE 2

Install-SqlDscServer -Install -AcceptLicensingTerms -InstanceName 'MyInstance' -Features 'SQLENGINE','ARC' -SqlSysAdminAccounts @('MyAdminAccount') -MediaPath 'E:\' -AzureSubscriptionId 'MySubscriptionId' -AzureResourceGroup 'MyRG' -AzureRegion 'West-US' -AzureTenantId 'MyTenantId' -AzureServicePrincipal 'MyPrincipalName' -AzureServicePrincipalSecret ('MySecret' | ConvertTo-SecureString -AsPlainText -Force)

Installs the database engine for the named instance MyInstance and onboard the server to Azure Arc.

EXAMPLE 3

Install-SqlDscServer -Install -AcceptLicensingTerms -MediaPath 'E:\' -AzureSubscriptionId 'MySubscriptionId' -AzureResourceGroup 'MyRG' -AzureRegion 'West-US' -AzureTenantId 'MyTenantId' -AzureServicePrincipal 'MyPrincipalName' -AzureServicePrincipalSecret ('MySecret' | ConvertTo-SecureString -AsPlainText -Force)

Installs the Azure Arc Agent on the server.

EXAMPLE 4

Install-SqlDscServer -ConfigurationFile 'MySqlConfig.ini' -MediaPath 'E:\'

Installs SQL Server using the configuration file 'MySqlConfig.ini'.

EXAMPLE 5

Install-SqlDscServer -PrepareImage -AcceptLicensingTerms -Features 'SQLENGINE' -InstanceId 'MyInstance' -MediaPath 'E:\'

Prepares the server for using the database engine for an instance named 'MyInstance'.

EXAMPLE 6

Install-SqlDscServer -Upgrade -AcceptLicensingTerms -InstanceName 'MyInstance' -MediaPath 'E:\'

Upgrades the instance 'MyInstance' with the SQL Server version that is provided by the media path.

EXAMPLE 7

Install-SqlDscServer -EditionUpgrade -AcceptLicensingTerms -ProductKey 'NewEditionProductKey' -InstanceName 'MyInstance' -MediaPath 'E:\'

Upgrades the instance 'MyInstance' with the SQL Server edition that is provided by the media path.

EXAMPLE 8

Install-SqlDscServer -InstallFailoverCluster -AcceptLicensingTerms -InstanceName 'MyInstance' -Features 'SQLENGINE' -InstallSqlDataDir 'D:\MSSQL\Data' -SqlSysAdminAccounts @('MyAdminAccount') -FailoverClusterNetworkName 'TestCluster01A' -FailoverClusterIPAddresses 'IPv4;192.168.0.46;ClusterNetwork1;255.255.255.0' -MediaPath 'E:\'

Installs the database engine in a failover cluster with the instance name 'MyInstance'.

EXAMPLE 9

Install-SqlDscServer -PrepareFailoverCluster -AcceptLicensingTerms -InstanceName 'MyInstance' -Features 'SQLENGINE' -MediaPath 'E:\'

Prepares to installs the database engine in a failover cluster with the instance name 'MyInstance'.

PARAMETERS

-AcceptLicensingTerms

Required parameter to be able to run unattended install. By specifying this parameter you acknowledge the acceptance all license terms and notices for the specified features, the terms and notices that the Microsoft SQL Server setup executable normally ask for.

Type: SwitchParameter
Parameter Sets: InstallAzureArcAgent, InstallRole, Install, PrepareImage, Upgrade, EditionUpgrade, InstallFailoverCluster, PrepareFailoverCluster
Aliases:

Required: True
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-AddCurrentUserAsSqlAdmin

See the notes section for more information.

Type: SwitchParameter
Parameter Sets: InstallRole
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-AgtSvcAccount

See the notes section for more information.

Type: String
Parameter Sets: InstallRole, Install, InstallFailoverCluster, PrepareFailoverCluster
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AgtSvcPassword

See the notes section for more information.

Type: SecureString
Parameter Sets: InstallRole, Install, InstallFailoverCluster, PrepareFailoverCluster, UsingConfigurationFile
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AgtSvcStartupType

See the notes section for more information.

Type: String
Parameter Sets: InstallRole, Install
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AllowUpgradeForSSRSSharePointMode

See the notes section for more information.

Type: SwitchParameter
Parameter Sets: Upgrade
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-ASBackupDir

See the notes section for more information.

Type: String
Parameter Sets: InstallRole, Install, InstallFailoverCluster
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ASCollation

See the notes section for more information.

Type: String
Parameter Sets: InstallRole, Install, InstallFailoverCluster
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ASConfigDir

See the notes section for more information.

Type: String
Parameter Sets: InstallRole, Install, InstallFailoverCluster
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ASDataDir

See the notes section for more information.

Type: String
Parameter Sets: InstallRole, Install, InstallFailoverCluster
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ASLogDir

See the notes section for more information.

Type: String
Parameter Sets: InstallRole, Install, InstallFailoverCluster
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ASProviderMSOLAP

See the notes section for more information.

Type: SwitchParameter
Parameter Sets: InstallRole, Install, InstallFailoverCluster
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-ASServerMode

See the notes section for more information.

Type: String
Parameter Sets: InstallRole, Install, InstallFailoverCluster
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ASSvcAccount

See the notes section for more information.

Type: String
Parameter Sets: InstallRole, Install, InstallFailoverCluster, PrepareFailoverCluster
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ASSvcPassword

See the notes section for more information.

Type: SecureString
Parameter Sets: InstallRole, Install, InstallFailoverCluster, PrepareFailoverCluster, UsingConfigurationFile
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ASSvcStartupType

See the notes section for more information.

Type: String
Parameter Sets: InstallRole, Install, InstallFailoverCluster
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ASSysAdminAccounts

See the notes section for more information.

Type: String[]
Parameter Sets: InstallRole, Install, InstallFailoverCluster
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ASTempDir

See the notes section for more information.

Type: String
Parameter Sets: InstallRole, Install, InstallFailoverCluster
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AzureArcProxy

See the notes section for more information.

Type: String
Parameter Sets: InstallAzureArcAgent, InstallRole, Install
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AzureRegion

See the notes section for more information.

Type: String
Parameter Sets: InstallAzureArcAgent
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Type: String
Parameter Sets: InstallRole, Install
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AzureResourceGroup

See the notes section for more information.

Type: String
Parameter Sets: InstallAzureArcAgent
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Type: String
Parameter Sets: InstallRole, Install
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AzureServicePrincipal

See the notes section for more information.

Type: String
Parameter Sets: InstallAzureArcAgent
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Type: String
Parameter Sets: InstallRole, Install
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AzureServicePrincipalSecret

See the notes section for more information.

Type: SecureString
Parameter Sets: InstallAzureArcAgent
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Type: SecureString
Parameter Sets: InstallRole, Install
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AzureSubscriptionId

See the notes section for more information.

Type: String
Parameter Sets: InstallAzureArcAgent
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Type: String
Parameter Sets: InstallRole, Install
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AzureTenantId

See the notes section for more information.

Type: String
Parameter Sets: InstallAzureArcAgent
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Type: String
Parameter Sets: InstallRole, Install
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-BrowserSvcStartupType

See the notes section for more information.

Type: String
Parameter Sets: InstallRole, Install, Upgrade
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ConfigurationFile

Specifies an configuration file to use during SQL Server setup. This parameter cannot be used together with any of the setup actions, but instead it is expected that the configuration file specifies what setup action to run.

Type: String
Parameter Sets: UsingConfigurationFile
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EditionUpgrade

Specifies the setup action EditionUpgrade.

Type: SwitchParameter
Parameter Sets: EditionUpgrade
Aliases:

Required: True
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-EnableRanU

See the notes section for more information.

Type: SwitchParameter
Parameter Sets: InstallRole, Install
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-Enu

See the notes section for more information.

Type: SwitchParameter
Parameter Sets: InstallRole, Install, PrepareImage, Upgrade, InstallFailoverCluster, PrepareFailoverCluster
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-FailoverClusterDisks

See the notes section for more information.

Type: String[]
Parameter Sets: InstallFailoverCluster
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-FailoverClusterGroup

See the notes section for more information.

Type: String
Parameter Sets: InstallFailoverCluster
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-FailoverClusterIPAddresses

See the notes section for more information.

Type: String[]
Parameter Sets: InstallFailoverCluster
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-FailoverClusterNetworkName

See the notes section for more information.

Type: String
Parameter Sets: InstallFailoverCluster
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-FailoverClusterRollOwnership

See the notes section for more information.

Type: UInt16
Parameter Sets: Upgrade
Aliases:

Required: False
Position: Named
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False

-FarmAccount

See the notes section for more information.

Type: String
Parameter Sets: InstallRole
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-FarmAdminiPort

See the notes section for more information.

Type: UInt16
Parameter Sets: InstallRole
Aliases:

Required: False
Position: Named
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False

-FarmPassword

See the notes section for more information.

Type: SecureString
Parameter Sets: InstallRole
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Features

See the notes section for more information.

Type: String[]
Parameter Sets: InstallRole
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Type: String[]
Parameter Sets: Install, PrepareImage, InstallFailoverCluster, PrepareFailoverCluster
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-FileStreamLevel

See the notes section for more information.

Type: UInt16
Parameter Sets: InstallRole, Install, InstallFailoverCluster, PrepareFailoverCluster
Aliases:

Required: False
Position: Named
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False

-FileStreamShareName

See the notes section for more information.

Type: String
Parameter Sets: InstallRole, Install, InstallFailoverCluster, PrepareFailoverCluster
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force

If specified the command will not ask for confirmation. Same as if Confirm:$false is used.

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-FTUpgradeOption

See the notes section for more information.

Type: String
Parameter Sets: Upgrade
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-IAcknowledgeEntCalLimits

See the notes section for more information.

Type: SwitchParameter
Parameter Sets: InstallRole, Install, PrepareImage, InstallFailoverCluster, PrepareFailoverCluster
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-Install

Specifies the setup action Install.

Type: SwitchParameter
Parameter Sets: InstallAzureArcAgent, InstallRole, Install
Aliases:

Required: True
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-InstallFailoverCluster

Specifies the setup action InstallFailoverCluster.

Type: SwitchParameter
Parameter Sets: InstallFailoverCluster
Aliases:

Required: True
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-InstallSharedDir

See the notes section for more information.

Type: String
Parameter Sets: InstallRole, Install, PrepareImage, InstallFailoverCluster, PrepareFailoverCluster
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InstallSharedWowDir

See the notes section for more information.

Type: String
Parameter Sets: InstallRole, Install, InstallFailoverCluster, PrepareFailoverCluster
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InstallSqlDataDir

See the notes section for more information.

Type: String
Parameter Sets: InstallRole, Install
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Type: String
Parameter Sets: InstallFailoverCluster
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InstanceDir

See the notes section for more information.

Type: String
Parameter Sets: InstallRole, Install, PrepareImage, Upgrade, InstallFailoverCluster, PrepareFailoverCluster
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InstanceId

See the notes section for more information.

Type: String
Parameter Sets: InstallRole, Install, Upgrade, InstallFailoverCluster, PrepareFailoverCluster
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Type: String
Parameter Sets: PrepareImage
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InstanceName

See the notes section for more information.

Type: String
Parameter Sets: InstallRole
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Type: String
Parameter Sets: Install, Upgrade, EditionUpgrade, InstallFailoverCluster, PrepareFailoverCluster
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ISSvcAccount

See the notes section for more information.

Type: String
Parameter Sets: InstallRole, Install, Upgrade, InstallFailoverCluster, PrepareFailoverCluster
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ISSvcPassword

See the notes section for more information.

Type: SecureString
Parameter Sets: InstallRole, Install, Upgrade, InstallFailoverCluster, PrepareFailoverCluster, UsingConfigurationFile
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ISSvcStartupType

See the notes section for more information.

Type: String
Parameter Sets: InstallRole, Install, Upgrade, InstallFailoverCluster, PrepareFailoverCluster
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MediaPath

Specifies the path where to find the SQL Server installation media. On this path the SQL Server setup executable must be found.

Type: String
Parameter Sets: (All)
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MPYCacheDirectory

See the notes section for more information.

Type: String
Parameter Sets: InstallRole, Install
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MRCacheDirectory

See the notes section for more information.

Type: String
Parameter Sets: InstallRole, Install
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-NpEnabled

See the notes section for more information.

Type: SwitchParameter
Parameter Sets: InstallRole, Install
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-Passphrase

See the notes section for more information.

Type: SecureString
Parameter Sets: InstallRole
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PBDMSSvcAccount

See the notes section for more information.

Type: String
Parameter Sets: InstallRole, Install
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PBDMSSvcPassword

See the notes section for more information.

Type: SecureString
Parameter Sets: InstallRole, Install
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PBDMSSvcStartupType

See the notes section for more information.

Type: String
Parameter Sets: InstallRole, Install
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PBEndPortRange

See the notes section for more information.

Type: UInt16
Parameter Sets: InstallRole, Install, PrepareImage, InstallFailoverCluster, PrepareFailoverCluster
Aliases:

Required: False
Position: Named
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False

-PBEngSvcAccount

See the notes section for more information.

Type: String
Parameter Sets: InstallRole, Install, PrepareImage, InstallFailoverCluster, PrepareFailoverCluster
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PBEngSvcPassword

See the notes section for more information.

Type: SecureString
Parameter Sets: InstallRole, Install, PrepareImage, InstallFailoverCluster, PrepareFailoverCluster
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PBEngSvcStartupType

See the notes section for more information.

Type: String
Parameter Sets: InstallRole, Install, PrepareImage, InstallFailoverCluster, PrepareFailoverCluster
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PBScaleOut

See the notes section for more information.

Type: SwitchParameter
Parameter Sets: InstallRole, Install, PrepareImage, InstallFailoverCluster, PrepareFailoverCluster
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-PBStartPortRange

See the notes section for more information.

Type: UInt16
Parameter Sets: InstallRole, Install, PrepareImage, InstallFailoverCluster, PrepareFailoverCluster
Aliases:

Required: False
Position: Named
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False

-PrepareFailoverCluster

Specifies the setup action PrepareFailoverCluster.

Type: SwitchParameter
Parameter Sets: PrepareFailoverCluster
Aliases:

Required: True
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-PrepareImage

Specifies the setup action PrepareImage.

Type: SwitchParameter
Parameter Sets: PrepareImage
Aliases:

Required: True
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-ProductCoveredBySA

See the notes section for more information.

Type: SwitchParameter
Parameter Sets: InstallRole, Install, Upgrade, EditionUpgrade, InstallFailoverCluster, PrepareFailoverCluster
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-ProductKey

See the notes section for more information.

Type: String
Parameter Sets: InstallRole, Install, Upgrade, InstallFailoverCluster, PrepareFailoverCluster
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Type: String
Parameter Sets: EditionUpgrade
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Role

See the notes section for more information.

Type: String
Parameter Sets: InstallRole
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RsInstallMode

See the notes section for more information.

Type: String
Parameter Sets: InstallRole, Install, InstallFailoverCluster, PrepareFailoverCluster
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RSSvcAccount

See the notes section for more information.

Type: String
Parameter Sets: InstallRole, Install, InstallFailoverCluster, PrepareFailoverCluster
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RSSvcPassword

See the notes section for more information.

Type: SecureString
Parameter Sets: InstallRole, Install, InstallFailoverCluster, PrepareFailoverCluster, UsingConfigurationFile
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RSSvcStartupType

See the notes section for more information.

Type: String
Parameter Sets: InstallRole, Install, InstallFailoverCluster, PrepareFailoverCluster
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SAPwd

See the notes section for more information.

Type: SecureString
Parameter Sets: InstallRole, Install, InstallFailoverCluster
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SecurityMode

See the notes section for more information.

Type: String
Parameter Sets: InstallRole, Install, InstallFailoverCluster
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SkipRules

See the notes section for more information.

Type: String[]
Parameter Sets: InstallRole, Install, EditionUpgrade, InstallFailoverCluster
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SqlBackupDir

See the notes section for more information.

Type: String
Parameter Sets: InstallRole, Install, InstallFailoverCluster
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SqlCollation

See the notes section for more information.

Type: String
Parameter Sets: InstallRole, Install, InstallFailoverCluster
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SqlInstJava

See the notes section for more information.

Type: SwitchParameter
Parameter Sets: InstallRole, Install
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-SqlJavaDir

See the notes section for more information.

Type: String
Parameter Sets: InstallRole, Install
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SqlMaxDop

See the notes section for more information.

Type: UInt16
Parameter Sets: InstallRole, Install
Aliases:

Required: False
Position: Named
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False

-SqlMaxMemory

See the notes section for more information.

Type: UInt32
Parameter Sets: InstallRole, Install
Aliases:

Required: False
Position: Named
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False

-SqlMinMemory

See the notes section for more information.

Type: UInt32
Parameter Sets: InstallRole, Install
Aliases:

Required: False
Position: Named
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False

-SqlSvcAccount

See the notes section for more information.

Type: String
Parameter Sets: InstallRole, Install, InstallFailoverCluster, PrepareFailoverCluster
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SqlSvcInstantFileInit

See the notes section for more information.

Type: SwitchParameter
Parameter Sets: InstallRole, Install
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-SqlSvcPassword

See the notes section for more information.

Type: SecureString
Parameter Sets: InstallRole, Install, InstallFailoverCluster, PrepareFailoverCluster, UsingConfigurationFile
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SqlSvcStartupType

See the notes section for more information.

Type: String
Parameter Sets: InstallRole, Install, InstallFailoverCluster
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SqlSysAdminAccounts

See the notes section for more information.

Type: String[]
Parameter Sets: InstallRole, Install
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Type: String[]
Parameter Sets: InstallFailoverCluster
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SqlTempDbDir

See the notes section for more information.

Type: String
Parameter Sets: InstallRole, Install, InstallFailoverCluster
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SqlTempDbFileCount

See the notes section for more information.

Type: UInt16
Parameter Sets: InstallRole, Install, InstallFailoverCluster
Aliases:

Required: False
Position: Named
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False

-SqlTempDbFileGrowth

See the notes section for more information.

Type: UInt16
Parameter Sets: InstallRole, Install, InstallFailoverCluster
Aliases:

Required: False
Position: Named
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False

-SqlTempDbFileSize

See the notes section for more information.

Type: UInt16
Parameter Sets: InstallRole, Install, InstallFailoverCluster
Aliases:

Required: False
Position: Named
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False

-SqlTempDbLogDir

See the notes section for more information.

Type: String
Parameter Sets: InstallRole, Install, InstallFailoverCluster
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SqlTempDbLogFileGrowth

See the notes section for more information.

Type: UInt16
Parameter Sets: InstallRole, Install, InstallFailoverCluster
Aliases:

Required: False
Position: Named
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False

-SqlTempDbLogFileSize

See the notes section for more information.

Type: UInt16
Parameter Sets: InstallRole, Install, InstallFailoverCluster
Aliases:

Required: False
Position: Named
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False

-SqlUserDbDir

See the notes section for more information.

Type: String
Parameter Sets: InstallRole, Install, InstallFailoverCluster
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SqlUserDbLogDir

See the notes section for more information.

Type: String
Parameter Sets: InstallRole, Install, InstallFailoverCluster
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SuppressPrivacyStatementNotice

See the notes section for more information.

Type: SwitchParameter
Parameter Sets: InstallRole, Install
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-TcpEnabled

See the notes section for more information.

Type: SwitchParameter
Parameter Sets: InstallRole, Install
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-Timeout

Specifies how long to wait for the setup process to finish. Default value is 7200 seconds (2 hours). If the setup process does not finish before this time, an exception will be thrown.

Type: UInt32
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: 7200
Accept pipeline input: False
Accept wildcard characters: False

-UpdateEnabled

See the notes section for more information.

Type: SwitchParameter
Parameter Sets: InstallRole, Install, PrepareImage, Upgrade, InstallFailoverCluster, PrepareFailoverCluster
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-UpdateSource

See the notes section for more information.

Type: String
Parameter Sets: InstallRole, Install, PrepareImage, Upgrade, InstallFailoverCluster, PrepareFailoverCluster
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Upgrade

Specifies the setup action Upgrade.

Type: SwitchParameter
Parameter Sets: Upgrade
Aliases:

Required: True
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-UseSqlRecommendedMemoryLimits

See the notes section for more information.

Type: SwitchParameter
Parameter Sets: InstallRole, Install
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-Confirm

Prompts you for confirmation before running the cmdlet.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

OUTPUTS

None.

NOTES

The parameters are intentionally not described since it would take a lot of effort to keep them up to date. Instead there is a link that points to the SQL Server command line setup documentation which will stay relevant.

RELATED LINKS

https://docs.microsoft.com/en-us/sql/database-engine/install-windows/install-sql-server-from-the-command-prompt

Home

Commands

Resources

Usage

Clone this wiki locally