Add-SCSQLDeployment

Adds a SQL Server deployment to a SQL Server profile.

Description

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

For more information about Add-SCSQLDeployment, type: "Get-Help Add-SCSQLDeployment -online".

Parameters

AgentServiceRunAsAccount

Required? true
Accept Pipeline Input? false
Position? named
Specifies the Run As account to use for the SQL Server agent service.

InstanceID

Required? true
Accept Pipeline Input? false
Position? named
Specifies a SQL Server deployment instance ID.

MediaSource

Required? true
Accept Pipeline Input? false
Position? named
Specifies a media source for a SQL Server deployment.

Name

Required? true
Accept Pipeline Input? false
Position? named
Specifies the name of a VMM object.

SQLProfile

Required? true
Accept Pipeline Input? true (ByValue)
Position? named
Specifies a SQL Server profile object.

SQLServiceRunAsAccount

Required? true
Accept Pipeline Input? false
Position? named
Specifies the Run As account to use for the SQL Server service.

SQLSysAdminMemberList

Required? true
Accept Pipeline Input? false
Position? named
Specifies a list of users that are SQL Server administrators.

DeploymentRunAsAccount

Required? false
Accept Pipeline Input? false
Position? named
Specifies the Run As account to use for installing SQL Server.

DeploymentTimeoutSeconds

Required? false
Accept Pipeline Input? false
Position? named
Specifies the amount of time, in seconds, that the SQL Server deployment waits before timing out.

EnableNamedPipes

Required? false
Accept Pipeline Input? false
Position? named
Indicates that named pipes are used for remote connections.

EnableTCP

Required? false
Accept Pipeline Input? false
Position? named
Indicates that TCP/IP is used for remote connections.

InstanceName

Required? false
Accept Pipeline Input? false
Position? named
Specifies the SQL Server Analysis Services (SSAS) database instance name.

JobVariable

Required? false
Accept Pipeline Input? false
Position? named
Specifies that job progress is tracked and stored in the variable named by this parameter. 

MergeSQLAnswerFile

Required? false
Accept Pipeline Input? false
Position? named
Specifies that the cmdlet merge the specified SQL Server configuration file with the specified guest operating system settings. The default value is TRUE. This parameter is used by the VMM console. You do not need to use this parameter at the command prompt.

ProductKey

Required? false
Accept Pipeline Input? false
Position? named
Specifies a product key. The product key is a 25-digit number that identifies the product license. A product key can be used to register VMM or an operating system to be installed on a virtual machine or host.

PROTipID

Required? false
Accept Pipeline Input? false
Position? named
Specifies the ID of the PRO tip that triggered this action. This allows for auditing of PRO tips.

ReportingServiceRunAsAccount

Required? false
Accept Pipeline Input? false
Position? named
Specifies the Run As account to use for Reporting Services.

RunAsynchronously

Required? false
Accept Pipeline Input? false
Position? named
Indicates that the job runs asynchronously so that control returns to the command shell immediately. 

SARunAsAccount

Required? false
Accept Pipeline Input? false
Position? named
Specifies the Run As account to use for the SQL Server system administrator (SA) password.

SecurityMode

Required? false
Accept Pipeline Input? false
Position? named
Specifies the security mode for SQL Server. Valid values are: WindowsAuthentication, SQLServerAuthentication.

SQLConfigurationFile

Required? false
Accept Pipeline Input? false
Position? named
Specifies a SQL Server configuration file.

Examples

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 object named SQLProfile01 and stores it in the $SQLProfile variable.

The second command gets the RunAsProfile object named NTSystemRAP, which will be used to initiate and run the deployment, and then stores object in the $DeploymentRunAsProfile variable.

The third command gets the RunAsProfile object named SQLAdminRAP, which defines the SA credentials for the deployment, and then stores the object in the $SARunAsProfile variable.

The fourth command gets the RunAsProfile named NTSystemRAP, which will be used as the service account for the SQL Server and SQL Server Agent Windows services, and then stores the object in the $SQLSvcsRunAsProfile variable.

The last command adds a SQL Server deployment to the SQLProfile01 SQL profile.

See Also