Remove-SCSQLProfile

Removes a SQL Server profile.

Syntax

Remove-SCSQLProfile [-SQLProfile] <SQLProfile> [-Confirm] [-JobVariable <String>] [-PROTipID <Guid>]
 [-RunAsynchronously] [-WhatIf] [<CommonParameters>]

Description

The Remove-SCSQLProfile cmdlet removes a Microsoft SQL Server profile.

Examples

Example 1: Remove a SQL Server profile

PS C:\> $SQLProfile = Get-SCSQLProfile -Name "SQLProfile01"
PS C:\> Remove-SCSQLProfile -SQLProfile $SQLProfile

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

The second command removes the SQL Server profile 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
-SQLProfile

Specifies the SQL Server profile that this cmdlet removes.

Type:SQLProfile
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