Add-SCSQLDeployment

Adds a SQL Server deployment to a SQL Server profile.

Syntax

Default (Default)

Add-SCSQLDeployment
    -AgentServiceRunAsAccount <VMMCredential>
    -SQLServiceRunAsAccount <VMMCredential>
    [-ReportingServiceRunAsAccount <VMMCredential>]
    [-DeploymentRunAsAccount <VMMCredential>]
    [-DeploymentTimeoutSeconds <Int32>]
    [-EnableNamedPipes <Boolean>]
    [-SARunAsAccount <VMMCredential>]
    [-SecurityMode <String>]
    [-EnableTCP <Boolean>]
    [-ProductKey <String>]
    -SQLProfile <SQLProfile>
    -Name <String>
    -InstanceID <String>
    -MediaSource <String>
    -SQLSysAdminMemberList <String[]>
    [-SQLConfigurationFile <Script>]
    [-InstanceName <String>]
    [-MergeSQLAnswerFile <Boolean>]
    [-RunAsynchronously]
    [-PROTipID <Guid>]
    [-JobVariable <String>]
    [<CommonParameters>]

Description

The Add-SCSQLDeployment cmdlet adds a Microsoft SQL Server deployment to a SQL Server profile.

Examples

Example 1: Add a SQL Server deployment to a SQL Server profile

PS C:\> $SQLProfile = Get-SCSQLProfile -Name "SQLProfile01"
PS C:\> $DeploymentRunAsProfile = Get-SCRunAsProfile -Name "NTSystemRAP"
PS C:\> $SARunAsProfile = Get-SCRunAsProfile -Name "SQLAdminRAP"
PS C:\> $SQLSvcsRunAsProfile = Get-SCRunAsProfile -Name "NTSystemRAP"
PS C:\> Add-SCSQLDeployment -SQLProfile $SQLProfile -Name "SQL Deployment 01" -MediaSource "C:\SQLMedia" -InstanceID "SysPrepSQL" -InstanceName "MSSQLSERVER" -DeploymentTimeoutSeconds 3600 -SQLAuthenticationType "SQLServerAuthentication" -EnableNamedPipes $True -EnableTCP $True -SQLSysAdminMemberList @("Contoso\SQLAdmins") -ProductKey $Null -AgentServiceRunAsProfile $SQLSvcsRunAsProfile -SQLServiceRunAsProfile $SQLSvcsRunAsProfile -DeploymentRunAsProfile $DeploymentRunAsProfile -SARunAsProfile $SARunAsProfile

The first command gets the SQL Server profile named SQLProfile01, and then stores that object in the $SQLProfile variable.

The second command gets the RunAsProfile named NTSystemRAP, and then stores that object in the $DeploymentRunAsProfile variable. For more information, type Get-Help Get-SCRunAsProfile. A subsequent command specifies this object to initiate and run the deployment.

The third command gets the RunAsProfile named SQLAdminRAP, and then stores that object in the $SARunAsProfile variable. A subsequent command defines this value as the system administrator credentials for the deployment.

The fourth command gets the RunAsProfile named NTSystemRAP, and then stores that object in the $SQLSvcsRunAsProfile variable. A subsequent command specifies this value as the service account for the SQL Server and SQL Server Agent Windows services,

The final command adds a SQL Server deployment named SQL Deployment 01 to the SQLProfile01 SQL profile. This command specifies RunAsProfile objects that previous commands stored in variables.

Parameters

-AgentServiceRunAsAccount

Specifies the Run As account that the SQL Server agent service uses.

Parameter properties

Type:VMMCredential
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-DeploymentRunAsAccount

Specifies the Run As account that this cmdlet uses to install SQL Server.

Parameter properties

Type:VMMCredential
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-DeploymentTimeoutSeconds

Specifies the amount of time, in seconds, that the SQL Server deployment waits before it times out.

Parameter properties

Type:Int32
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-EnableNamedPipes

Indicates whether remote connections use named pipes.

Parameter properties

Type:Boolean
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-EnableTCP

Indicates whether remote connections use TCP/IP.

Parameter properties

Type:Boolean
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-InstanceID

Specifies the ID of a SQL Server deployment instance.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-InstanceName

Specifies the name of the SQL Server Analysis Services (SSAS) database instance.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-JobVariable

Specifies a variable in which job progress is tracked and stored.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-MediaSource

Specifies a media source for the new SQL Server deployment.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-MergeSQLAnswerFile

Indicates whether this cmdlet merges the answer file together with guest operating system settings. The default value is $True. VMM console uses this parameter. Do not specify this parameter.

Parameter properties

Type:Boolean
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Name

Specifies the name of the SQL Server deployment that this cmdlet adds.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ProductKey

Specifies the product key for the VMM Server. The product key is a 25-digit number that identifies the product license.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-PROTipID

Specifies the ID of the Performance and Resource Optimization tip (PRO tip) that triggered this action. This parameter lets you audit PRO tips.

Parameter properties

Type:Guid
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ReportingServiceRunAsAccount

Specifies the Run As account that Reporting Services uses.

Parameter properties

Type:VMMCredential
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-RunAsynchronously

Indicates that the job runs asynchronously so that control returns to the command shell immediately.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-SARunAsAccount

Specifies the Run As account for the SQL Server system administrator password.

Parameter properties

Type:VMMCredential
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-SecurityMode

Specifies the security mode for SQL Server. Valid values are: WindowsAuthentication and SQLServerAuthentication.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-SQLConfigurationFile

Specifies the configuration file for the SQL Server deployment that this cmdlet adds.

Parameter properties

Type:Script
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-SQLProfile

Specifies the SQL Server profile to which this cmdlet adds a SQL Server deployment.

Parameter properties

Type:SQLProfile
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-SQLServiceRunAsAccount

Specifies the Run As account that the SQL Server service uses.

Parameter properties

Type:VMMCredential
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-SQLSysAdminMemberList

Specifies an array of users who are SQL Server administrators.

Parameter properties

Type:

String[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

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

Outputs

SQLDeployment

This cmdlet returns a SQLDeployment object.