你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

Set-ScannerContentScan

Defines settings for an Microsoft Purview Information Protection scanner content scan job.

语法

Default (默认值)

Set-ScannerContentScan
    [-Schedule <Schedule>]
    [-DiscoverInformationTypes <DiscoverInformationTypes>]
    [-RecommendedAsAutomatic <OnOffEnum>]
    [-EnableDlp <OnOffEnum>]
    [-Enforce <OnOffEnum>]
    [-LabelFilesByContent <OnOffEnum>]
    [-RelabelFiles <OnOffEnum>]
    [-AllowLabelDowngrade <OnOffEnum>]
    [-EnforceDefaultLabel <OnOffEnum>]
    [-DefaultLabelType <DefaultLabelType>]
    [-DefaultLabelId <Guid>]
    [-DefaultOwner <String>]
    [-RepositoryOwner <String>]
    [-PreserveFileDetails <OnOffEnum>]
    [-IncludeFileTypes <String>]
    [-ExcludeFileTypes <String>]
    [-WhatIf]
    [-Confirm]

说明

Defines the configuration for your content scan job, which scans the content in the defined repositories, according to the settings defined. For more information about content scan jobs, see the Microsoft Purview Information Protection on-premises scanner documentation.

示例

Example 1 Define default content scan job settings

PS C:\WINDOWS\system32> Set-ScannerContentScan -Enforce Off

This example defines the content scan job with default settings, and sets the Policy enforcement option to Off.

Example 2 Define a basic content scan job that runs continuously

PS C:\WINDOWS\system32> Set-ScannerContentScan -Enforce Off -RelabelFiles On -EnforceDefaultLabel On -Schedule Always

This example defines the content scan job with without enforcing a policy, allowing files to be re-labeled, using a default label, and is scheduled to run always.

Example 3 Define a content scan job that allows for specific re-labeling actions only

PS C:\WINDOWS\system32> Set-ScannerContentScan -RelabelFiles On -AllowLabelDowngrade On -EnforceDefaultLabel On

This example defines a content scan job that allows for content to be re-labeled only to downgrade a label or use a default label.

Example 4 Define a content scan job that excludes .msg and .tmp files

PS C:\WINDOWS\system32> Set-ScannerContentScan -IncludeFileTypes '' -ExcludeFileTypes '.msg,.tmp'

This example defines a content scan job that includes all file types except for .msg and .tmp files.

Example 5 Define a content scan job with DLP enabled, and a specific repository owner

PS C:\WINDOWS\system32> Set-ScannerContentScan -EnableDLP On -RepositoryOwner 'domain\user'

This example defines the content scan job to use the Microsoft Purview data loss prevention (DLP) sensitivity information types when scanning your content, and also defines a specific owner for the content scan job's repositories.

Example 6 Define a content scan job with a default label to use when automatically labeling content

PS C:\WINDOWS\system32> Set-ScannerContentScan -DefaultLabelType Custom -DefaultLabelId 'ff1f1c9d-2f92-4a18-3d84-4608b742424'

This example defines the content scan job with a specific label used as the default label, specified by the label ID.

参数

-AllowLabelDowngrade

Determines whether the content scan job allows for labeling downgrade actions.

Relevant only when the RelabelFiles parameter is set to on.

参数属性

类型:OnOffEnum
默认值:None
接受的值:On, Off
支持通配符:False
不显示:False

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-Confirm

Prompts you for confirmation before running the cmdlet.

参数属性

类型:SwitchParameter
默认值:None
支持通配符:False
不显示:False
别名:cf

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-DefaultLabelId

Defines the ID of the default label used when automatically labeling content with a default label.

Mandatory if the DefaultLabelType parameter is set to custom.

参数属性

类型:Guid
默认值:None
支持通配符:False
不显示:False

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-DefaultLabelType

Determines the type of default label used when automatically labeling content with a default label.

When used, define the label ID you want to use as the default ID using the DefaultLabelId parameter.

参数属性

类型:DefaultLabelType
默认值:None
接受的值:None, PolicyDefault, Custom
支持通配符:False
不显示:False

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-DefaultOwner

Defines the default owner value used for the files scanned, using the account email address. By default, this is the scanner account.

参数属性

类型:String
默认值:None
支持通配符:False
不显示:False

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-DiscoverInformationTypes

Determines the types of information types discovered during the content scan job.

参数属性

类型:DiscoverInformationTypes
默认值:None
接受的值:PolicyOnly, All
支持通配符:False
不显示:False

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-EnableDlp

Determines whether the content scan job uses the data loss prevention (DLP) sensitivity information types when scanning your content.

Tip

If you configure this parameter, you may also want to configure a specific repository owner using the RepositoryOwner parameter.

参数属性

类型:OnOffEnum
默认值:None
接受的值:On, Off
支持通配符:False
不显示:False

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-Enforce

Determines whether the content scan job enforces content scanning and labeling according to your policy.

参数属性

类型:OnOffEnum
默认值:None
接受的值:On, Off
支持通配符:False
不显示:False

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-EnforceDefaultLabel

Determines whether using a default label is always used when relabeling content.

Relevant only when the RelabelFiles parameter is set to on.

参数属性

类型:OnOffEnum
默认值:None
接受的值:On, Off
支持通配符:False
不显示:False

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-ExcludeFileTypes

Determines any file types that are ignored during your content scan job. Define multiple file types using a comma-separated list.

If you define this parameter, define the IncludeFileTypes parameter as null. For example, Example 4 above.

Relevant only when the OverrideContentScanJob parameter is set to on in the Add-ScannerRepository or Set-ScannerRepository cmdlets.

参数属性

类型:String
默认值:None
支持通配符:False
不显示:False

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-IncludeFileTypes

Explicitly determines the file types that are scanned by your content scan job. Define multiple file types using a comma-separated list.

If you define this parameter, define the ExcludeFileTypes parameter as null. For example, Example 4 above.

Relevant only when the OverrideContentScanJob parameter is set to on in the Add-ScannerRepository or Set-ScannerRepository cmdlets.

参数属性

类型:String
默认值:None
支持通配符:False
不显示:False

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-LabelFilesByContent

Determines whether the Label files based on content content scan job option is enabled or disabled.

参数属性

类型:OnOffEnum
默认值:None
接受的值:On, Off
支持通配符:False
不显示:False

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-PreserveFileDetails

Determines whether the file details, including the date modified, last modified, and modified by settings are preserved while scanning and auto-labeling.

参数属性

类型:OnOffEnum
默认值:None
接受的值:On, Off
支持通配符:False
不显示:False

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-RecommendedAsAutomatic

Determines whether recommended labels are used to automatically label your content.

参数属性

类型:OnOffEnum
默认值:None
接受的值:On, Off
支持通配符:False
不显示:False

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-RelabelFiles

Determines whether the content scan job is allowed to relabel files.

Tip

When using this parameter, use the following additional parameters as needed:

  • EnforceDefaultLabel
  • AllowLabelDowngrade

参数属性

类型:OnOffEnum
默认值:None
接受的值:On, Off
支持通配符:False
不显示:False

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-RepositoryOwner

Specifies the SAMAccountname (domain\user), UPN (user@domain), or SID of a group that owns the repository.

The owners are granted full control permissions on the file if the permissions on the file are changed by a matched DLP rule.

Relevant only when the EnableDlp parameter is set to on.

参数属性

类型:String
默认值:None
支持通配符:False
不显示:False

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-Schedule

Determines whether the content scan job runs according to a specific schedule, or continuously.

参数属性

类型:Schedule
默认值:None
接受的值:Manual, Always
支持通配符:False
不显示:False

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

参数属性

类型:SwitchParameter
默认值:None
支持通配符:False
不显示:False
别名:wi

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

输入

None

输出

System.Object