Remove-DPMTape

Remove-DPMTape

Removes a tape from a DPM library.

Syntax

Parameter Set: Default
Remove-DPMTape [-DPMLibrary] <Library> [-Tape] <Media[]> [-Async] [-JobStateChangedEventHandler <JobStateChangedEventHandler> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Detailed Description

The Remove-DPMTape cmdlet removes a tape from a System Center 2012 – Data Protection Manager (DPM) library.

Parameters

-Async

Indicates that the command runs asynchronously. When you run a command asynchronously, the command prompt returns immediately even if the job takes an extended time to finish.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-DPMLibrary<Library>

Specifies a DPM library object.

Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

false

-JobStateChangedEventHandler<JobStateChangedEventHandler>

Indicates that the cmdlet displays the status of the operation to the user. Use this parameter in conjunction with the Async parameter.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Tape<Media[]>

Specifies an array of tape objects.

Aliases

none

Required?

true

Position?

2

Default Value

none

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

false

-Confirm

Prompts you for confirmation before running the cmdlet.

Required?

false

Position?

named

Default Value

false

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Required?

false

Position?

named

Default Value

false

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see    about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

Outputs

The output type is the type of the objects that the cmdlet emits.

Notes

  • For more information, type "Get-Help Remove-DPMTape -detailed".

Examples

Example 1: Remove a tape from a library

This example removes a tape from the library.

The first command uses the Get-DPMLibrary cmdlet to retrieve the library for the server, and stores the result in the $DPMLib variable.

The second command uses the Get-Tape cmdlet to retrieve the tape object, and stores the result in the $Tape variable.

The third command uses the Unlock-DPMLibraryDoor cmdlet to unlock the tape door.

The fourth command uses the Remove-DPMTape cmdlet to remove the third tape from the library.

PS C:\> $DPMLib = Get-DPMLibrary -DPMServerName "Contoso-DPMServer"
PS C:\> $Tape = Get-Tape -DPMLibrary $DPMLib
PS C:\> Unlock-DPMLibraryDoor -DPMLibrary $DPMLib
PS C:\> Remove-DPMTape -DPMLibrary $DPMLib -Tape $Tape[2]

Add-DPMTape

Get-DPMLibrary

Get-DPMTape

Set-DPMTape