Remove-SCSQLDeployment

Removes a SQL Server deployment from a SQL Server profile.

Syntax

Remove-SCSQLDeployment [-SQLDeployment] <SQLDeployment> [-Confirm] [-JobVariable <String>] [-PROTipID <Guid>]
 [-RunAsynchronously] [-WhatIf] [<CommonParameters>]

Description

The Remove-SCSQLDeployment cmdlet removes a Microsoft SQL Server deployment from a SQL Server profile.

Examples

Example 1: Remove a SQL Server deployment from a SQL profile

PS C:\> $SQLProfile = Get-SCSQLProfile -Name "SQLProfile01"
PS C:\> $SQLDeployment = Get-SCSQLDeployment -SQLProfile $SQLProfile -Name "SQL Deployment 01"
PS C:\> Remove-SCSQLDeployment -SQLDeployment $SQLDeployment

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

The second command gets the SQL Server deployment object named SQL Deployment 01 from the SQL profile stored in $SQLProfile and then stores the object in the $SQLDeployment variable.

The last command removes the SQL Server deployment stored in $SQLDeployment from the SQL Server profile stored in $SQLProfile.

Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Required:False
Position:Named
Default value:False
Accept pipeline input:False
Accept wildcard characters:False
-JobVariable

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

Type:String
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters: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.

Type:Guid
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-RunAsynchronously

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

Type:SwitchParameter
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-SQLDeployment

Specifies the SQL Server deployment that this cmdlet removes.

Type:SQLDeployment
Required:True
Position:0
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False
-WhatIf

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

Type:SwitchParameter
Aliases:wi
Required:False
Position:Named
Default value:False
Accept pipeline input:False
Accept wildcard characters:False

Outputs

SQLDeployment

This cmdlet returns a **SQLDeployment** object.