New-FsrmFileScreenTemplate

New-FsrmFileScreenTemplate

Creates a file screen template.

構文

Parameter Set: cim:CreateInstance0
New-FsrmFileScreenTemplate [-Name] <String> [-Active] [-AsJob] [-CimSession <CimSession[]> ] [-Description <String> ] [-IncludeGroup <String[]> ] [-Notification <CimInstance[]> ] [-ThrottleLimit <Int32> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

詳細説明

The New-FsrmFileScreenTemplate cmdlet creates a file screen template. A file screen template defines the group of file groups to block, the type of screening to perform (active or passive), and the set of notifications that the file screen generates.

You can use file screen templates to centrally manage your file screens by updating the templates instead of the individual file screens. When you make changes to a template, you can choose to apply those changes to all file screens that are based on that template or only to the file screens whose properties match those in the template.

パラメーター

-Active

Indicates that the server will fail any I/O operation that violates the file screen. If you do not specify this parameter, the server does not fail violating I/O operations and still runs any action that is associated with the file screen.

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-AsJob

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-CimSession<CimSession[]>

リモート セッションまたはリモート コンピューターでコマンドレットを実行します。New-CimSession コマンドレットや Get-CimSession コマンドレットの出力など、コンピューター名またはセッション オブジェクトを入力します。既定値は、ローカル コンピューターで実行中の現在のセッションです。

エイリアス

Session

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-Description<String>

Specifies a description for the file screen template.

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-IncludeGroup<String[]>

Specifies an array of names of file groups that you want to exclude from file screening.

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-Name<String>

Specifies the name for the file screen template.

エイリアス

なし

必須?

true

位置は?

2

既定値

なし

パイプライン入力を許可する

True (ByPropertyName)

ワイルドカード文字を許可する

true

-Notification<CimInstance[]>

Specifies an array of notification action objects. You can use the New-FsrmFmjNotificationAction cmdlet to create a FsrmFmjNotificationAction object.

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

True (ByPropertyName)

ワイルドカード文字を許可する

false

-ThrottleLimit<Int32>

このコマンドレットを実行するために確立できる最大同時操作数を指定します。このパラメーターを省略するか、値として 0 を入力した場合、Windows PowerShell® では、コンピューターで実行している CIM コマンドレットの数に基づいて、コマンドレットに対する最適なスロットル制限を計算します。スロットル制限は現在のコマンドレットのみに適用され、セッションまたはコンピューターには適用されません。

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-Confirm

コマンドレットを実行する前に、ユーザーに確認を求めます。

必須?

false

位置は?

named

既定値

false

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-WhatIf

コマンドレットを実行するとどのような結果になるかを表示します。コマンドレットは実行されません。

必須?

false

位置は?

named

既定値

false

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

<CommonParameters>

このコマンドレットは次の共通パラメーターをサポートします。-Verbose、-Debug、-ErrorAction、-ErrorVariable、-OutBuffer、-OutVariable.詳細については、以下を参照してください。 about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216)。

入力

入力型は、コマンドレットにパイプできるオブジェクトの型です。

出力

出力型は、コマンドレットによって生成されるオブジェクトの型です。

Example 1: Create a passive file screen template

This command creates a passive file screen template named "Filter Non-HTML text files" that logs any files that match the "Non-HTML text files" file group. The file screen template is passive because the command does not specify the Active parameter. This means that users can create non-HTML text files.

PS C:\> New-FsrmFileScreenTemplate "Filter Non-HTML text files" –IncludeGroup "Non-HTML text files"

Example 2: Create an active file screen template

The first command creates a File Server Resource Manager (FSRM) action object and stores the results in the $Notification variable. The action sends an email notification to the file owner and administrator. The RunLimitInterval parameter specifies an interval of 2 minutes before the server can send the email notification again.

This second command creates an active file screen template named "Filter Non-HTML text files" that restricts any files that match the Non-HTML text files file group. When a user attempts to create a non-HTML text file, the file screen performs the notification action stored in the $Notification variable.

PS C:\> $Notification = New-FsrmAction -Type Email -MailTo "[Admin Email];[File Owner]" -Subject “Warning: attempted to create a non-HTML text file” -Body “You attempted to create a non-HTML text file. This is not allowed.” -RunLimitInterval 120
PS C:\> New-FsrmFileScreenTemplate -Name "Filter Non-HTML text files" –IncludeGroup "Non-HTML text files" -Notification $Notification -Active

関連トピック

Get-FsrmFileScreenTemplate

Set-FsrmFileScreenTemplate

Remove-FsrmFileScreenTemplate

New-FsrmAction