Remove-ScannerRepository
从 Microsoft Purview 信息保护扫描程序内容扫描作业中删除存储库。
语法
Default (默认值)
Remove-ScannerRepository
[-Repositories] <System.Collections.Generic.List`1[Microsoft.InformationProtection.Powershell.AIP.Commandlets.Scanner.MoonCake.RepositoryInfo]>
[-WhatIf]
[-Confirm]
说明
删除 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 |