共用方式為


Remove-ScannerRepository

從 Microsoft Purview 資訊保護掃描程式內容掃描作業中刪除存儲庫。

語法

Default (預設值)

Remove-ScannerRepository

    [-Repositories] <System.Collections.Generic.List`1[Microsoft.InformationProtection.Powershell.AIP.Commandlets.Scanner.MoonCake.RepositoryInfo]>
    [-WhatIf]
    [-Confirm]

Description

刪除 Repositories 參數描述的或管道 Get-ScannerRepository cmdlet 返回的任何存儲庫。

有關內容掃描作業的詳細資訊,請參閱 Microsoft Purview 資訊保護本地掃描程式文件

範例

範例 1 移除為內容掃描作業設定的所有儲存庫

PS C:\WINDOWS\system32> Get-ScannerRepository | Remove-ScannerRepository

此示例顯示了一個完全管道化的 cmdlet,其中首先返回存儲庫,然後刪除存儲庫。

範例 2 從內容掃描作業中刪除特定儲存庫

PS C:\WINDOWS\system32> Get-ScannerRepository -Path 'c:\repoToScan1' | Remove-ScannerRepository

此示例顯示了一個完全管道化的 cmdlet,其中首先返回存儲庫,然後刪除存儲庫。

範例 3 從內容掃描作業中刪除與特定通配符模式匹配的任何儲存庫

PS C:\WINDOWS\system32> Get-ScannerRepository -Path 'c:\repo*' | Remove-ScannerRepository

此示例顯示了一個完全管道化的 cmdlet,其中首先返回存儲庫,然後刪除存儲庫。

範例 4:從內容掃描作業中刪除特定存儲庫,而不使用管道

PS C:\WINDOWS\system32> $repos = Get-ScannerRepository -Path 'c:\repoToScan1'
PS C:\WINDOWS\system32> Remove-ScannerRepository $repos

此示例顯示了一個完全管道化的 cmdlet,其中首先返回存儲庫,然後刪除存儲庫。

參數

-Confirm

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

參數屬性

類型:SwitchParameter
預設值:None
支援萬用字元:False
不要顯示:False
別名:cf

參數集

(All)
Position:Named
必要:False
來自管線的值:False
來自管線按屬性名稱的值:False
來自剩餘引數的值:False

-Repositories

描述要刪除的存儲庫。

參數屬性

類型:

System.Collections.Generic.List`1[Microsoft.InformationProtection.Powershell.AIP.Commandlets.Scanner.MoonCake.RepositoryInfo]

預設值:None
支援萬用字元:False
不要顯示:False

參數集

(All)
Position:0
必要:True
來自管線的值:True
來自管線按屬性名稱的值:False
來自剩餘引數的值:False

-WhatIf

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

參數屬性

類型:SwitchParameter
預設值:None
支援萬用字元:False
不要顯示:False
別名:無線

參數集

(All)
Position:Named
必要:False
來自管線的值:False
來自管線按屬性名稱的值:False
來自剩餘引數的值:False

輸入

System.Collections.Generic.List`1

輸出

System.Object