Set-CsFileTransferFilterConfiguration

Modifies a collection of file transfer filter configuration settings. File transfer filter settings are used to block a user's ability to transfer certain types of files (for example, files with a .vbs or .ps1 file extension) by using Skype for Business Server clients. This cmdlet was introduced in Lync Server 2010.

Syntax

Set-CsFileTransferFilterConfiguration
   [[-Identity] <XdsIdentity>]
   [-Action <FileFilterAction>]
   [-Enabled <Boolean>]
   [-Extensions <PSListModifier>]
   [-Force]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Set-CsFileTransferFilterConfiguration
   [-Instance <PSObject>]
   [-Action <FileFilterAction>]
   [-Enabled <Boolean>]
   [-Extensions <PSListModifier>]
   [-Force]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

When sending instant messages, users can attach files and send them to the other participants in the conversation. Skype for Business Server can be configured so that files with certain extensions--typically extensions of file types that could potentially prove harmful--are not allowed to be sent from the client.

The ability of users to transfer files using Skype for Business Server clients is determined by the file transfer filter configuration settings applied at the global or (optionally) the site scopes. The Set-CsFileTransferFilterConfiguration cmdlet allows you to modify an existing file transfer filter configuration. You can modify the list of extensions that will be blocked by adding or removing extensions, or by creating a new list altogether. You can also use this cmdlet to change whether or not file transfer filtering is enabled and at what level (block only the files with extensions matching those in the Extensions list, or block all files).

Examples

-------------------------- Example 1 --------------------------

Set-CsFileTransferFilterConfiguration -Identity site:Redmond -Enabled $False

The command shown in Example 1 disables file transfer filtering for the Redmond site (that is, the file transfer filtering configuration that has the Identity site:Redmond). To carry out this task, the Enabled parameter is included in the command and is set to $False.

-------------------------- Example 2 --------------------------

Set-CsFileTransferFilterConfiguration -Identity site:Redmond -Extensions @{Add=".ps1"}

The commands shown in Example 2 add a new file extension (.ps1, the file extension for Windows PowerShell scripts) to the list of file extensions prohibited in the Redmond site. To add the new file extension, the Set-CsFileTransferFilterConfiguration cmdlet uses the Extensions parameter and the Add list modifier. The modifier adds the specified file extension--.ps1--to the list of prohibited extensions. To add multiple extensions by using a single command, simply separate the file extensions using commas: @{Add=".ps1",".ps2",".ps3"}. Note that you must include the period when specifying a file extension.

-------------------------- Example 3 --------------------------

Get-CsFileTransferFilterConfiguration | Set-CsFileTransferFilterConfiguration -Extensions @{Add=".ps1"}

In Example 3, the .ps1 file extension is added to the Extensions list of all the file transfer filter configurations currently in use in the organization. To do this, the Get-CsFileTransferFilterConfiguration cmdlet is first called, without any additional parameters, in order to return a collection of all the file transfer filter configurations currently in use. That collection is then piped to the Set-CsFileTransferFilterConfiguration cmdlet, which adds the .ps1 file extension to each item in the collection.

-------------------------- Example 4 --------------------------

Set-CsFileTransferFilterConfiguration -Identity site:Redmond -Extensions @{Remove=".ps1"}

In Example 4, the file extension .ps1 is removed from the list of extensions blocked by the file transfer filter configuration for the Redmond site. This example is identical to Example 3 except that, instead of calling the Add list modifier to add an extension to the list, the Remove list modifier is called to remove an extension from that list.

-------------------------- Example 5 --------------------------

$a = Get-CsFileTransferFilterConfiguration -Identity site:Redmond

$a.Extensions.Remove(".ps1")

Set-CsFileTransferFilterConfiguration -Instance $a

Example 5 performs the same action as Example 4: it removes the .ps1 extension from the list of file transfer filter extensions for the Redmond site. However, in this case we first retrieve the file transfer filter configuration for site:Redmond and assign the output to the variable $a; $a now contains the configuration for the Redmond site. Next, we retrieve the Extensions property of $a, which is the Extensions property of site:Redmond ($a.Extensions). This property contains the list of file extensions. Following the Extensions property is a call to the Remove method ($a.Extensions.Remove). We pass the value .ps1 to the Remove method; this will remove that extension from the list in the Extensions property. However, this has removed the extension only from the configuration stored in memory in the variable $a. To make the change to the database, we need to call the Set-CsFileTransferFilterConfiguration cmdlet, passing $a to the Instance parameter.

Parameters

-Action

Determines the action to be taken if this file transfer filter configuration is enabled. If set to BlockAll then all file transfers will be prohibited, regardless of file extension. If set to Block (the default value) file transfers will be allowed unless the file extension appears as one of the prohibited file types listed in the Extensions property.

To allow unrestricted file transfers (that is, to allow users to exchange any type of file, regardless of file extension), set the Enabled property of this policy to False.

Type:FileFilterAction
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Lync Server 2010, Lync Server 2013, Skype for Business Server 2015, Skype for Business Server 2019

-Confirm

Prompts you for confirmation before executing the command.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Lync Server 2010, Lync Server 2013, Skype for Business Server 2015, Skype for Business Server 2019

-Enabled

Enables or disables file transfer filtering. If this parameter is set to True, files with the specified extensions (or all files, depending on the value of the Action property) cannot be transferred from the client. If this parameter is set to False, any file can be transferred.

Default: True.

Type:Boolean
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Lync Server 2010, Lync Server 2013, Skype for Business Server 2015, Skype for Business Server 2019

-Extensions

List of file extensions that will be blocked. If you attempt to use a Skype for Business Server client to transfer a file that has a file extension matching one of the extensions in this list, that transfer will be blocked and the file will not be transferred. This list is ignored if Action is set to BlockAll (all file transfers are blocked) or if Enabled is set to False (no file transfers are blocked).

By default, the following file extensions are included in the Extensions property Default: .ade, .adp, .app, .asp, .bas, .bat, .cer, .chm, .cmd, .com, .cpl, .crt, .csh, .exe, .fxp, .grp, .hlp, .hta, .inf, .ins, .isp, .its, .js, .jse, .ksh, .lnk, .mad, .maf, .mag, .mam, .maq, .mar., mas., .mat, .mau, .mav, .maw, .mda, .mdb. .mde, .mdt, .mdw, .mdz, .msc, .msi, .msp, .mst, .ocx, .ops, .pcd, .pif, .pl, .pnp, .prf, .prg, .pst, .reg, .scf, .scr, .sct, .shb, .shs, .tmp, .url, .vb, .vbe, .vbs, .vsd, .vsmacros, .vss, .vst, .vsw, .ws, .wsc. .wsf, .wsh

Type:PSListModifier
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Lync Server 2010, Lync Server 2013, Skype for Business Server 2015, Skype for Business Server 2019

-Force

Suppresses any confirmation prompts that would otherwise be displayed before making changes.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Lync Server 2010, Lync Server 2013, Skype for Business Server 2015, Skype for Business Server 2019

-Identity

Unique identifier of the file transfer configuration you want to modify. This value will be either global or site:<site name>, where <site name> is the name of the site to which the settings apply, such as site:Redmond.

If this parameter is not specified, then the Set-CsFileTransferFilterConfiguration cmdlet will, by default, update the global settings.

Type:XdsIdentity
Position:2
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Lync Server 2010, Lync Server 2013, Skype for Business Server 2015, Skype for Business Server 2019

-Instance

Allows you to pass a reference to an object to the cmdlet rather than set individual parameter values. This object must be of type FileTransferFilterConfiguration and can be retrieved by calling the Get-CsFileTransferFilterConfiguration cmdlet.

Type:PSObject
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False
Applies to:Lync Server 2010, Lync Server 2013, Skype for Business Server 2015, Skype for Business Server 2019

-WhatIf

Describes what would happen if you executed the command without actually executing the command.

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Lync Server 2010, Lync Server 2013, Skype for Business Server 2015, Skype for Business Server 2019

Inputs

Microsoft.Rtc.Management.WritableConfig.Settings.ImFilter.FileTransferFilterConfiguration object. Accepts pipelined input of file transfer filter configuration objects.

Outputs

This cmdlet does not return a value or object. Instead, the cmdlet configures instances of the Microsoft.Rtc.Management.WritableConfig.Settings.ImFilter.FileTransferFilterConfiguration object.