Remove-SCServicingWindow

Removes a servicing window definition from VMM.

Syntax

Remove-SCServicingWindow
      [-ServicingWindow] <ServicingWindow>
      [-RunAsynchronously]
      [-PROTipID <Guid>]
      [-JobVariable <String>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]

Description

The Remove-SCServicingWindow cmdlet removes a servicing window definition from Virtual Machine Manager (VMM). If the servicing window is assigned to a virtual machine, a host, or a service, the association is also removed.

Examples

Example 1: Remove a servicing window

PS C:\> $SvcWindow = Get-SCServicingWindow -Name "Backup Staging A"
PS C:\> Remove-SCServicingWindow -ServicingWindow $SvcWindow -Confirm

The first command gets the servicing window object named Backup Staging A and stores the object in the $SvcWindow variable.

The second command removes the servicing window stored in $SvcWindow (Backup Staging A).

Important: All objects subscribing to this service window will lose their subscription.

Required Parameters

-ServicingWindow

Specifies a servicing window object.

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

Optional 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
-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
-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

Notes

  • Requires a VMM servicing window object, which you can get with the Get-SCServicingWindow cmdlet.