Remove-SCServiceConfiguration

Deletes a service configuration object from the VMM library.

Syntax

Remove-SCServiceConfiguration
      [-VMMServer <ServerConnection>]
      [-ServiceConfiguration] <ServiceConfiguration>
      [-RunAsynchronously]
      [-PROTipID <Guid>]
      [-JobVariable <String>]
      [-WhatIf]
      [-Confirm]
      [-OnBehalfOfUser <String>]
      [-OnBehalfOfUserRole <UserRole>]
      [<CommonParameters>]

Description

The Remove-SCServiceConfiguration cmdlet deletes one or more service configuration objects from the Virtual Machine Manager (VMM) library.

Examples

Example 1: Remove a specific service configuration object from the library

PS C:\> $SvcConfig = Get-SCServiceConfiguration -VMMServer "VMMServer01.Contoso.com" -Name "Service01"
PS C:\> Remove-SCServiceConfiguration -ServiceConfiguration $SvcConfig -Confirm

The first command gets the service configuration object named Service01 and stores the object in the $SvcConfig variable.

The second command removes the service configuration object stored in $SvcConfig from the VMM database and deletes the corresponding service configuration object and all other associated objects in the library. A confirmation prompt is displayed before the the service configuration object is removed.

Example 2: Remove all service configuration objects

PS C:\> $SvcConfigs = Get-SCServiceConfiguration -VMMServer "VMMServer01.Contoso.com"
PS C:\> $SvcConfigs | Remove-SCServiceConfiguration -Confirm

The first command gets all service configuration objects on VMMServer01 and stores the objects in the $SvcConfigs variable.

The second command removes all the service configuration objects stored in $SvcConfigs and deletes all other associated objects in the library. A confirmation prompt is displayed before the the service configuration objects are removed.

Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

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

Specifies that job progress is tracked and stored in the variable named by this parameter.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-OnBehalfOfUser

Specifies a user name. This cmdlet operates on behalf of the user that this parameter specifies.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-OnBehalfOfUserRole

Specifies a user role. To obtain a user role, use the Get-SCUserRole cmdlet. This cmdlet operates on behalf of the user role that this parameter specifies.

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

Specifies a service configuration object.

Type:ServiceConfiguration
Position:0
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False
-VMMServer

Specifies a VMM server object.

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