Remove-ScannerRepository
Removes a repository from an Microsoft Purview Information Protection scanner content scan job.
Remove-ScannerRepository
[-Repositories] <System.Collections.Generic.List`1[Microsoft.InformationProtection.Powershell.AIP.Commandlets.Scanner.MoonCake.RepositoryInfo]>
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Deletes any repositories described by the Repositories parameter, or returned by a piped Get-ScannerRepository cmdlet.
For more information about content scan jobs, see the Microsoft Purview Information Protection on-premises scanner documentation.
PS C:\WINDOWS\system32> Get-ScannerRepository | Remove-ScannerRepository
This example shows a fully piped cmdlet, where the repositories are first returned, and then deleted.
PS C:\WINDOWS\system32> Get-ScannerRepository -Path 'c:\repoToScan1' | Remove-ScannerRepository
This example shows a fully piped cmdlet, where the repository is first returned, and then deleted.
PS C:\WINDOWS\system32> Get-ScannerRepository -Path 'c:\repo*' | Remove-ScannerRepository
This example shows a fully piped cmdlet, where the repositories are first returned, and then deleted.
PS C:\WINDOWS\system32> $repos = Get-ScannerRepository -Path 'c:\repoToScan1'
PS C:\WINDOWS\system32> Remove-ScannerRepository $repos
This example shows a fully piped cmdlet, where the repositories are first returned, and then deleted.
Prompts you for confirmation before running the cmdlet.
Type: | SwitchParameter |
Aliases: | cf |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Describes the repositories you want to delete.
Type: | System.Collections.Generic.List`1[Microsoft.InformationProtection.Powershell.AIP.Commandlets.Scanner.MoonCake.RepositoryInfo] |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: | SwitchParameter |
Aliases: | wi |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
System.Collections.Generic.List`1[[Microsoft.InformationProtection.Powershell.AIP.Commandlets.Scanner.MoonCake.RepositoryInfo, AIP, Version=2.9.0.0, Culture=neutral, PublicKeyToken=null]]
System.Object