Remove-Snapshot function deletes a snapshot that was previously created with
Remove-Snapshot [[-snapshot] <Object>] [<CommonParameters>]
Remove-Snapshot function serves to delete a snapshot (or volume shadow copy) that was previously created on a specified drive and accessed via a symbolic link. This function essentially undoes the operations performed by the
New-Snapshot function. The function ensures that it is being run with administrator privileges, as deleting a shadow copy requires such rights.
ATTENTION: The function requires administrative rights! If the function is run without these privileges, an exception is thrown.
Example 1: Removes a snapshot created prior with New-Snapshot #
PS C:\> Remove-Snapshot -snapshot $snapshot
In this example, the
Remove-Snapshot function is used to remove a snapshot previously created with
The snapshot to be removed. This parameter accepts only the function return value from
New-Snapshot. This parameter is mandatory.
Type: Object Parameter Sets: (All) Aliases: Required: False Position: 0 Default value: None Accept pipeline input: False Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
The function requires administrative rights! If the function is run without these privileges, an exception is thrown.