Remove-AIPScannerRepository

Removes a repository from an Azure Information Protection content scan job.

Syntax

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

Description

Deletes any repositories described by the Repositories parameter, or returned by a piped Get-AIPScannerRepository cmdlet.

For more information about content scan jobs, see the Azure Information Protection on-premises scanner documentation.

Examples

Example 1 Remove all repositories configured for your content scan job

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

This example shows a fully piped cmdlet, where the repositories are first returned, and then deleted.

Example 2 Remove a specific repository from your content scan job

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

This example shows a fully piped cmdlet, where the repository is first returned, and then deleted.

Example 3 Remove any repositories that match a specific wildcard pattern from your content scan job

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

This example shows a fully piped cmdlet, where the repositories are first returned, and then deleted.

Example 4 Remove a specific repository from your content scan job without piping

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

This example shows a fully piped cmdlet, where the repositories are first returned, and then deleted.

Parameters

-Confirm

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

-Repositories

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

-WhatIf

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

Inputs

System.Collections.Generic.List`1[[Microsoft.InformationProtection.Powershell.AIP.Commandlets.Scanner.MoonCake.RepositoryInfo, AIP, Version=2.9.0.0, Culture=neutral, PublicKeyToken=null]]

Outputs

System.Object