Come and Check our BETA Alpha version of Powershellcenter.net
Send me your comment to Powershell@powershellcenter.com

Synopsis

Starts the on-demand scan.

Syntax

Start-FseOnDemandScan [-ApplicationName <string>] [-CAS <string>] [-EnableFileFiltering <Boolean>] [-EnableHeaderFiltering <Boolean>] [-EnableVirusScan <Boolean>] [-EngineUsagePolicy <EngineUsageEnum>] [-FileFilteringDeletionText <string>] [-MailboxList <string[]>] [-MailboxScope <SelectedEnum>] [-MalwareDeletionText <string>] [-VirusAction <VirusActionEnum>] [-VirusQuarantine <Boolean>] [<CommonParameters>]

Detailed Description

Starts the on-demand scan. The status of the on-demand scan must be STOPPED in order for this cmdlet to successfully run. To retrieve the status of the on-demand scan, execute the following cmdlet: Get-FseOnDemandScan -Status By default, when the on-demand scan starts, it uses the settings specified in Set-FseOnDemandScan. You may temporarily override some of these settings by using like-named parameters in this cmdlet. If any overrides are specified, the on-demand scan creates its running configuration by using those values. For values that you cannot or do not specify, the on-demand scan uses the values in Set-FseOnDemandScan. NOTE: Settings specified in Start-FseOnDemandScan do not replace the settings specified in Set-FseOnDemandScan.

Parameters

-ApplicationName [<string>]

Specifies the name of the application that is invoking the on-demand scan. Optional. If specified, this value is used in logging operations. There is no default value.

Required?   false
Position?   named
Default value?   No Default Value
Accept pipeline input?   true (ByPropertyName)
Accept wildcard characters?   false

-CAS [<string>]

Specifies the name of the Exchange Client Access Server (CAS) through which the on-demand scan connects to your Exchange environment. Optional. By default, the on-demand scan uses the value set in Set-FseOnDemandScan; this parameter permits you to override it.

The value of this parameter can be the fully-qualified domain name of the CAS, or the name or IP address of the CAS. The default CAS server is detected during the first run after installation. It is recommended that you specify a network load-balanced CAS if you want to change the default.

Microsoft Exchange Server 2010 requires that a CAS be configured for the on-demand scan. For earlier Exchange Server versions, a CAS is not required and, if entered, is ignored by Start-FseOnDemandScan.

Required?   false
Position?   named
Default value?   No Default Value
Accept pipeline input?   true (ByValue, ByPropertyName)
Accept wildcard characters?   false

-EnableFileFiltering [<Boolean>]

Enables file filtering by the on-demand scan. Optional. By default, the on-demand scan uses the value set in Set-FseOnDemandScan; this parameter permits you to override it. The possible values are $false and $true. A value of $true indicates that file filtering by the on-demand scan is enabled.

Required?   false
Position?   named
Default value?   No Default Value
Accept pipeline input?   true (ByPropertyName)
Accept wildcard characters?   false

-EnableHeaderFiltering [<Boolean>]

Enables header filtering by the on-demand scan. Optional. By default, the on-demand scan uses the value set in Set-FseOnDemandScan; this parameter permits you to override it. The possible values are $false and $true. A value of $true indicates that header filtering by the on-demand scan is enabled.

NOTE: Header filtering includes subject line and sender-domain filters.

Required?   false
Position?   named
Default value?   No Default Value
Accept pipeline input?   true (ByPropertyName)
Accept wildcard characters?   false

-EnableVirusScan [<Boolean>]

Indicates that the on-demand scan should scan for viruses. Optional. By default, the on-demand scan uses the value set in Set-FseOnDemandScan; this parameter permits you to override it. The possible values are $false and $true. A value of $true indicates that virus scanning by the on-demand scan is enabled (scanning takes place with the antivirus engines that were last set with Set-FseOnDemandScan). A value of $false turns off virus scanning, although file filtering or header filtering may still be enabled.

Required?   false
Position?   named
Default value?   No Default Value
Accept pipeline input?   true (ByPropertyName)
Accept wildcard characters?   false

-EngineUsagePolicy [<EngineUsageEnum>]

Specifies the intelligent engine selection policy that Microsoft Forefront Protection 2010 for Exchange Server uses to decide how many engines are used to scan content. Optional. By default, the on-demand scan uses the value set in Set-FseOnDemandScan; this parameter permits you to override it. Note that the engine selection is made with the Set-FseEngineManagement cmdlet.

Using more engines increases the likelihood that all viruses are caught. However, the more engines used, the greater the impact on system performance.

The possible values are:

All - Scan with all of the engines selected in -Engines

Available - Scan with the subset of all selected engines that are available (default)

Dynamic - Sscan with a dynamically-chosen subset of the selected engines

One - Scan with a single dynamically-chosen engine

The difference between "All" and "Available" is: if an engine is taken offline to be updated, "All" queues the mail flow until the engine is returned to service; "Available" continues scanning with the rest of the engines.

NOTE: The -EngineUsagePolicy used to be called "Bias".

Required?   false
Position?   named
Default value?   No Default Value
Accept pipeline input?   true (ByPropertyName)
Accept wildcard characters?   false

-FileFilteringDeletionText [<string>]

Specifies the text used to replace the contents of a file that was deleted because it matched a file filter. Optional. By default, the on-demand scan uses the value set in Set-FseOnDemandScan; this parameter permits you to override it. You can have up to 8,192 characters of deletion text, surrounded by quotation marks.

The default deletion text informs the recipient that a file was removed, and provides the name of the file and the name of the filter that it matched. The default is: "Microsoft Forefront Protection for Exchange Server removed a file since it was found to match a filter. File name: '%File%' Filter name: '%Filter%'".

The -FileFilteringDeletionText parameter enables you to enter your own custom text, including keyword substitution macros, which must be enclosed in apostrophes (for example: -FileFilteringDeletionText "'%File%' was deleted because it matched the '%Filter%' filter").

Required?   false
Position?   named
Default value?   No Default Value
Accept pipeline input?   true (ByPropertyName)
Accept wildcard characters?   false

-MailboxList [<string[]>]

Indicates which mailboxes are to be scanned if -MailboxScope was set to "Selected". Optional. By default, the on-demand scan uses the value set in Set-FseOnDemandScan; this parameter permits you to override it. Enter multiple items as an array. This is an example of a script to indicate selected mailboxes:

$MailboxesToScan = Mail1,Mail3,Mail6

Start-FseOnDemandScan -MailboxScope SELECTED -MailboxList $MailboxesToScan

Required?   false
Position?   named
Default value?   No Default Value
Accept pipeline input?   true (ByValue, ByPropertyName)
Accept wildcard characters?   false

-MailboxScope [<SelectedEnum>]

Specifies the scope of the mailboxes to be scanned. Optional. By default, the on-demand scan uses the value set in Set-FseOnDemandScan; this parameter permits you to override it.

The possible values are: All, None, and Selected. If you choose "Selected", indicate the mailboxes to be scanned with the -MailboxList parameter. If "None" is specified, no mailboxes are scanned.

Required?   false
Position?   named
Default value?   No Default Value
Accept pipeline input?   true (ByPropertyName)
Accept wildcard characters?   false

-MalwareDeletionText [<string>]

Specifies the text used to replace the contents of an infected file during a "Delete" action. Optional. By default, the on-demand scan uses the value set in Set-FseOnDemandScan; this parameter permits you to override it. You can have up to 8,192 characters of deletion text, surrounded by quotation marks.

The default deletion text informs the recipient that a file was removed, along with the name of the file and the name of the malicious software that was found. The default is: "Microsoft Forefront Protection for Exchange Server removed a file since it was found to contain malicious software. File name: '%File%' Malware name: '%Malware%'".

The MalwareDeletionText parameter enables you to enter your own custom text, including keyword substitution macros, which must be enclosed in apostrophes (for example: -MalwareDeletionText "This file was infected: '%File%' by the '%Malware%'").

Required?   false
Position?   named
Default value?   No Defaul Value
Accept pipeline input?   true (ByPropertyName)
Accept wildcard characters?   false

-VirusAction [<VirusActionEnum>]

Indicates the action that should be taken if a virus is detected. Optional. The possible values are SkipDetect (the default), Clean, and Delete.

Required?   false
Position?   named
Default value?   SkipDetect
Accept pipeline input?   false
Accept wildcard characters?   false

-VirusQuarantine [<Boolean>]

Indicates whether a message or file should be quarantined if a virus is detected. Optional. The possible values are $false and $true. The default of $true indicates that a message or file should be quarantined if infected.

NOTE: Messages or files can be quarantined regardless of the -VirusAction specified.

Required?   false
Position?   named
Default value?   true
Accept pipeline input?   false
Accept wildcard characters?   false

Input Type

Return Type

Notes

Examples

EXAMPLE 1

PS> Start-FseOnDemandScan There is no output if the command completes successfully.

Description

-----------

Starts the on-demand scan using the settings specified in Set-FseOnDemandScan. The current status of the on-demand scan must be STOPPED in order for this command to run successfully.

EXAMPLE 2

PS> Start-FseOnDemandScan -MailboxScope Selected -MailboxList mailbox1, mailbox2, mailbox3 There is no output if the command completes successfully.

Description

-----------

Starts the on-demand scan using most of the settings specified in Set-FseOnDemandScan. However, in order to limit the scan to three specific mailboxes, the settings for MailboxScope and MailboxList are overridden. The current status of the on-demand scan must be STOPPED in order for this command to run successfully.