Set-AIPScannerScannedFileTypes

Sets a list of file types to scan or exclude from scanning by the Azure Information Protection scanner.

Syntax

Set-AIPScannerScannedFileTypes
   [-Repository <String>]
   -ScannedFileTypes <String[]>
   [<CommonParameters>]

Description

The Set-AIPScannerScannedFileTypes cmdlet sets a list of file types to scan or exclude from scanning by the Azure Information Protection scanner. To scan all file types, use *. To scan only specific file types, specify *.<file name extension>. To exclude specific file types from being scanned, specify -*.<file name extension>.To reset the list back to defaults, specify @().

When you specify this list and do not specify a data repository, the list applies to all data repositories that do not have their own list specified.

After you have specified your file types list, you can verify the contents by running Get-AIPScannerConfiguration and Get-AIPScannerRepository. To change your list of file types:

Examples

Example 1: Configure the scanner to scan only .docx files

PS C:\> Set-AIPScannerScannedFileTypes -ScannedFileType *.docx

The operation was completed successfully

This command configures the scanner to scan only files that have a file name extension of .docx. Only this file type will be scanned unless a data repository has its own list of file types.

Example 2: Configure the scanner to scan only .docx, .txt and .csv files on a server share

PS C:\> Add-AIPScannerScannedFileTypes -Repository \\server\share1 -ScannedFileType @("*.docx","*.txt","*.csv")

The operation was completed successfully

This command configures the scanner to scan only files that have a file name extension of .docx, .txt or .csv on the server share named \\server\share1.

Example 3: Configure the scanner to scan all files except those that have a .dll or .lnk file name extension

PS C:\> Add-AIPScannerScannedFileTypes -ScannedFileType @("*","-*.dll","-*.lnk")

The operation was completed successfully

This command configures the scanner to scan all files except those that have a .dll or .lnk file name extension, and the data repository doesn't have its own file types list.

Example 4: Remove the file types list that was set for a data repository

PS C:\> Add-AIPScannerScannedFileTypes -Repository \\server\share1 -ScannedFileType @()

The operation was completed successfully

This command removes any previously included or excluded file types for the server share named \\server\share1. If the scanner has a list of included or excluded file types that applies to all data repositories, those settings apply instead.

Required Parameters

-ScannedFileTypes

Specifies the file type or array of file types to be included or excluded from scanning.

  • To scan all file types, specify *.
  • To scan only specific file types, specify *.<file name extension>. For example, *.docx.
  • To exclude specific file types from being scanned, specify -*.<file name extension>.For example, -*.docx.
  • To reset the list back to defaults, specify @().
Type:String[]
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

Optional Parameters

-Repository

Specifies a data repository that you have configured for the scanner by using Add-AIPScannerRepository. This parameter identifies a local path, network path, or SharePoint Server URL for the data repository to apply the file types list. Wildcards are not supported.

If no data repository is specified, the list applies to all data repositories that do not have their own file types list.

Type:String
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName, ByValue)
Accept wildcard characters:False

Inputs

System.String

Outputs

System.Object