Remove-WebConfigurationBackup

Removes an existing IIS configuration backup.

Syntax

Remove-WebConfigurationBackup
      [[-Name] <String>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]

Description

The Remove-WebConfigurationBackup cmdlet removes an Internet Information Services (IIS) configuration backup that was created by using the Backup-WebConfiguration cmdlet.

Examples

Example 1: Add and remove an IIS configuration backup

IIS:\> Backup-WebConfiguration -Name "MyNewBackup"
IIS:\> Get-WebConfigurationBackup -Name "MyNewBackup"
IIS:\> sleep 5
IIS:\> Remove-WebConfigurationBackup -Name "MyNewBackup"

This example creates a configuration backup, lists the backup created, sleeps for 5 seconds, and then removes the backup.

Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

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

-Name

Specifies the name of the configuration backup that this cmdlet removes. This cmdlet deletes the folder with this name from the $env:Windir\system32\inetsrv\backup folder.

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