--- title: "New-VBRSelectedFilesWildcardMask" description: "This cmdlet creates the VBRSelectedFilesWildcardMask object. This object defines a file mask that you can use to include files in the backup scope of a Veeam Agent backup job or to exclude them from it." canonical: "https://helpcenter.veeam.com/docs/vbr/powershell/new-vbrselectedfileswildcardmask.html" breadcrumb: "Veeam PowerShell Reference > Veeam PowerShell Reference > Veeam Agent Management > Working with Veeam Agent Backup Jobs and Policies > Veeam Agent Job Backup Scope > New-VBRSelectedFilesWildcardMask" dateModified: "2026-11-17" --- # New-VBRSelectedFilesWildcardMask ## Short Description Defines a file mask for the backup scope of Veeam Agent backup jobs. **Product Edition**: Community, Standard, Enterprise, Enterprise Plus, Veeam Universal License ## Syntax ``` New-VBRSelectedFilesWildcardMask -Wildcard [] ``` ## Detailed Description This cmdlet creates the [`VBRSelectedFilesWildcardMask`](vbrselectedfileswildcardmask.md) object. This object defines a file mask that you can use to include files in the backup scope of a Veeam Agent backup job or to exclude them from it. The mask applies only to file names and extensions, for example `*.log`. It does not accept paths. To apply the mask, set it as the `InclusionMask` or `ExclusionMask` parameter value of the [`New-VBRSelectedFilesBackupOptions`](new-vbrselectedfilesbackupoptions.md) or [`Set-VBRSelectedFilesBackupOptions`](set-vbrselectedfilesbackupoptions.md) cmdlet. **Note**: If the backup scope of a job that backs up a Windows computer includes an entire volume, Veeam Agent for Microsoft Windows backs up this volume at the volume level and does not apply file masks to it. ## Parameters

Parameter

Description

Type

Required

Position

Accept Pipeline Input

Wildcard

Specifies the file mask, for example *.log or ?ackup.tmp.

The mask applies only to file names and extensions, not to folder names. To exclude a folder, use a path mask. Do not specify a path or use the ** recursive pattern.

On Linux, macOS and Unix computers, the *.* mask matches only the names that contain a dot, and masks follow the case sensitivity of the file system. On Windows computers, masks are case-insensitive.

String

True

Named

True (ByPropertyName, ByValue)

`` This cmdlet supports Microsoft PowerShell common parameters. For more information on common parameters, see [ Microsoft Docs](https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_commonparameters?view=powershell-7). ## Output Object The cmdlet returns the `VBRSelectedFilesWildcardMask` object that defines a file mask for the backup scope. ## Examples ::: example ### Example 1. Excluding Files from Backup Scope Using File Mask (Windows) This example shows how to exclude all files of the TMP format from the backup scope of a Veeam Agent backup job that backs up a Windows computer. ``` $mask = New-VBRSelectedFilesWildcardMask -Wildcard "*.tmp" New-VBRSelectedFilesBackupOptions -OSPlatform Windows -BackupSelectedFiles -SelectedFiles "C:\Data" -ExclusionMask $mask ``` Perform the following steps: 1. Run the `New-VBRSelectedFilesWildcardMask` cmdlet. Specify the `Wildcard` parameter value. Save the result to the `$mask` variable. 2. Run the [`New-VBRSelectedFilesBackupOptions`](new-vbrselectedfilesbackupoptions.md) cmdlet. Specify the following settings: - Set the `Windows` value for the `OSPlatform` parameter. - Provide the `BackupSelectedFiles` parameter. - Specify the `SelectedFiles` parameter value. - Set the `$mask` variable as the `ExclusionMask` parameter value. ::: ::: example ### Example 2. Including Files in Backup Scope Using File Mask (Linux) This example shows how to back up only the PDF files from the `/home/user01` directory on a Linux computer. ``` $mask = New-VBRSelectedFilesWildcardMask -Wildcard "*.pdf" New-VBRSelectedFilesBackupOptions -OSPlatform Linux -BackupSelectedFiles -SelectedFiles "/home/user01" -InclusionMask $mask ``` Perform the following steps: 1. Run the `New-VBRSelectedFilesWildcardMask` cmdlet. Specify the `Wildcard` parameter value. Save the result to the `$mask` variable. 2. Run the [`New-VBRSelectedFilesBackupOptions`](new-vbrselectedfilesbackupoptions.md) cmdlet. Specify the following settings: - Set the `Linux` value for the `OSPlatform` parameter. - Provide the `BackupSelectedFiles` parameter. - Specify the `SelectedFiles` parameter value. - Set the `$mask` variable as the `InclusionMask` parameter value. ::: ## Related Commands - [`New-VBRSelectedFilesBackupOptions`](new-vbrselectedfilesbackupoptions.md) - [`Set-VBRSelectedFilesBackupOptions`](set-vbrselectedfilesbackupoptions.md)