共用方式為


Set-DPMTape

將磁帶標示為 [封存]、[清除器]、[免費] 或 [免費]。

語法

Set-DPMTape
   [-Tape] <Media[]>
   [-Archive]
   [-PassThru]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Set-DPMTape
   [-Tape] <Media[]>
   [-Cleaner]
   [-PassThru]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Set-DPMTape
   [-Tape] <Media[]>
   [-Free]
   [-PassThru]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Set-DPMTape
   [-Tape] <Media[]>
   [-NotFree]
   [-PassThru]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

Set-DPMTape Cmdlet 會將磁帶標示為封存、清除器、免費或非免費。

範例

範例 1:將磁帶標示為免費

PS C:\>$DpmLibrary = Get-DPMLibrary -DPMServerName "Contoso-DPMServer"
PS C:\> $DpmTape = Get-Tape -DPMLibrary $DpmLibrary
PS C:\> Set-DPMTape -Tape $DpmTape[1] -Free

第一個命令會使用 Get-DPMLibrary Cmdlet 來擷取伺服器的連結庫,然後將它儲存在$DpmLibrary變數中。

第二個命令會使用 Get-DPMTape Cmdlet 來擷取磁帶對象,然後將它儲存在$DpmTape變數中。

第三個命令會將第二個磁帶設定為 [免費]。

參數

-Archive

表示媒體是封存磁帶。

類型:SwitchParameter
Position:Named
預設值:None
必要:True
接受管線輸入:False
接受萬用字元:False

-Cleaner

表示媒體是清除磁帶。

類型:SwitchParameter
Position:Named
預設值:None
必要:True
接受管線輸入:False
接受萬用字元:False

-Confirm

在執行 Cmdlet 之前,提示您進行確認。

類型:SwitchParameter
別名:cf
Position:Named
預設值:False
必要:False
接受管線輸入:False
接受萬用字元:False

-Free

表示媒體是免費的供使用。

類型:SwitchParameter
Position:Named
預設值:None
必要:True
接受管線輸入:False
接受萬用字元:False

-NotFree

表示媒體不適用於使用。

類型:SwitchParameter
Position:Named
預設值:None
必要:True
接受管線輸入:False
接受萬用字元:False

-PassThru

會傳回 物件,代表您正在使用的專案。 根據預設,此 Cmdlet 不會產生任何輸出。

類型:SwitchParameter
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-Tape

指定此 Cmdlet 運作所在的磁帶陣列。 若要取得 Tape 物件,請使用 Get-DPMTape Cmdlet。

類型:Media[]
Position:1
預設值:None
必要:True
接受管線輸入:True
接受萬用字元:False

-WhatIf

顯示 Cmdlet 執行時會發生什麼事。 Cmdlet 未執行。

類型:SwitchParameter
別名:wi
Position:Named
預設值:False
必要:False
接受管線輸入:False
接受萬用字元:False

輸出

Tape