Start-DPMTapeDriveCleaning
Starts a job to clean a tape drive.
Syntax
Start-DPMTapeDriveCleaning
[-TapeDrive] <Drive[]>
[-JobStateChangedEventHandler <JobStateChangedEventHandler>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
The Start-DPMTapeDriveCleaning cmdlet starts a job to clean a tape drive.
Examples
Example 1: Clean a tape drive
PS C:\>$DpmLibrary = Get-DPMLibrary -DPMServerName "Contoso-DPMServer"
PS C:\> $DpmTapeDrive = Get-DPMTapeDrive -DPMLibrary $DPMLibrary
PS C:\> Start-DPMTapeDriveCleaning -TapeDrive $DpmTapeDrive
The first command uses the Get-DPMLibrary cmdlet to retrieve the library, and then stores it in the $DpmLibrary variable.
The second command uses the Get-DPMTapeDrive cmdlet to retrieve the tape drives in the library, and the stores the result in the $DpmTapeDrive variable.
The third command uses the Start-DPMTapeDriveCleaning cmdlet to clean the tape drive.
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 |
-JobStateChangedEventHandler
Specifies an event handler for Job.StateChanged events. Use this parameter to build a graphical user interface based on cmdlets. Do not use this parameter in the System Center 2019 - Data Protection Manager (DPM) Management Shell.
Type: | JobStateChangedEventHandler |
Aliases: | Handler |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-TapeDrive
Specifies an array of tape drives. This cmdlet cleans the drives that this parameter specifies.
Type: | Drive[] |
Position: | 1 |
Default value: | None |
Required: | True |
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 |
Outputs
Job