다음을 통해 공유


MSFT_FSRMAction class

Represents a FSRM action that can be triggered in response to a quota, file management job, or file screen event (for example, a quota is exceeded or a file violates a file screen).

The following syntax is simplified from Managed Object Format (MOF) code and includes all of the inherited properties.

Syntax

[dynamic, provider("FSRMWmiProvider")]
class MSFT_FSRMAction
{
  uint32  Type;
  string  MailTo = "";
  string  MailCC = "";
  string  MailBCC = "";
  string  Subject = "";
  string  Body = "";
  uint32  EventType;
  string  Command;
  string  WorkingDirectory = "";
  string  CommandParameters = "";
  uint32  SecurityLevel = 2;
  sint32  KillTimeOut = -1;
  boolean ShouldLogError = false;
  uint32  ReportTypes[];
  sint32  RunLimitInterval = 60;
};

Members

The MSFT_FSRMAction class has these types of members:

Methods

The MSFT_FSRMAction class has these methods.

Method Description
CreateAction Creates a new MSFT_FSRMAction instance.

Properties

The MSFT_FSRMAction class has these properties.

Body

Data type: string

Access type: Read/write

The content of the event or email. This property is used (and required) if the Type property is 1 (Event) or 2 (Email) and is limited to 10 KB.

Command

Data type: string

Access type: Read/write

The full path to the executable program or script to run. This property is used if the Type property is 3 (Command.) See the ExecutablePath property of IFsrmActionCommand.

CommandParameters

Data type: string

Access type: Read/write

The parameters for the executable program or script to be run. The maximum length of the string is 10KB. This property is used if the Type property is 3 (Command.) See the Arguments property of IFsrmActionCommand.

EventType

Data type: uint32

Access type: Read/write

The event type of the action. This property is used if the Type property is 1 (Event.) See the FsrmEventType enumeration.

None (0)

The event type is unknown.

Information (1)

The event type is informational.

Warning (2)

The event type is a warning.

Error (3)

The event type is an error.

KillTimeOut

Data type: sint32

Access type: Read/write

The timeout period, in minutes, after which the process created by the action will be terminated, or -1 (0xffffffff, the default value) if the process is not to be terminated. This property is used if the Type property is 3 (Command.) See the KillTimeOut property of IFsrmActionCommand.

MailBCC

Data type: string

Access type: Read/write

A semicolon-separated list of email addresses that are to be on the BCC line of the mail. This property is used if the Type property is 2 (Email.)

MailCC

Data type: string

Access type: Read/write

A semicolon-separated list of email addresses that are to be on the CC line of the mail. This property is used if the Type property is 2 (Email.)

MailTo

Data type: string

Access type: Read/write

A semicolon-separated list of email addresses that are to be on the TO line of the mail. This property is used if the Type property is 2 (Email) or 4 (Report.)

ReportTypes

Data type: uint32 array

Access type: Read/write

Specifies the type of the report to be generated by this action. This property is used if the Type property is 4 (Report.) See the FsrmReportType enumeration type.

LargeFiles (1)

A report is generated for any files that match the ReportLargeFileMinimum and ReportLargeFilePattern properties of the MSFT_FSRMSettings class.

FilesByFileGroup (2)

Lists groups of files. Create file groups using the MSFT_FSRMFileGroup class and put the names of the groups in the ReportFileGroupsIncluded property of the MSFT_FSRMSettings class. The ReportLimitMaxFilesPerFileGroup and ReportLimitMaxFileGroup properties of the MSFT_FSRMSettings class can be used to limit the report.

LeastRecentlyAccessed (3)

A report is generated for any files that matches the ReportLeastAccessedMinimum and ReportLeastAccessedFilePattern properties of the MSFT_FSRMSettings class.

MostRecentlyAccessed (4)

A report is generated for any files that matches the pattern in the ReportMostAccessedMaximum and ReportMostAccessedFilePattern properties of the MSFT_FSRMSettings class.

QuotaUsage (5)

A report is generated for any files that matches the ReportQuotaMinimumUsage properties of the MSFT_FSRMSettings class, up to the limit specified by the ReportLimitMaxQuota property of the MSFT_FSRMSettings class.

FilesByOwner (6)

A report is generated for any files that matches the ReportFileOwnerUser and ReportFileOwnerFilePattern properties of the MSFT_FSRMSettings class up to the limits specified by the ReportLimitMaxOwner and ReportLimitMaxFilesPerOwner properties of the MSFT_FSRMSettings class.

DuplicateFiles (8)

Lists duplicate files. All files with the same file name, file size, and last modify time under the scope of the report job are considered duplicates. For example, if the scope of the report is C:\ and D:\ and file file1.txt exists in C:\folder1\, C:\folder2\ and D:\folder1\ with the same modify time and file size, then the files are considered duplicates.

FileScreenAuditFiles (9)

Lists file screening events that have occurred for any files that match the ReportFileScreenAuditDaysSince, ReportFileScreenAuditUser, and ReportFileScreenAuditEnable properties of the MSFT_FSRMSettings class, up to the limit specified by the ReportLimitMaxFileScreenEvent property of the MSFT_FSRMSettings class.

FilesByProperty (10)

Lists files, grouped by property value, that matches the ReportPropertyName and ReportPropertyFilePattern properties of the MSFT_FSRMSettings class up to the limits specified by the ReportLimitMaxPropertyValue and ReportLimitMaxFilesPerPropertyValue properties of the MSFT_FSRMSettings class.

RunLimitInterval

Data type: sint32

Access type: Read/write

Specifies the minimum number of minutes between runs of the action. 60 is the default and 0xffffffff specifies that there is no limit.

SecurityLevel

Data type: uint32

Access type: Read/write

The account under which the executable program or script will be run. This property is used if the Type property is 3 (Command.) See the FsrmAccountType enumeration.

None (0)

The security level is not specified.

NetworkService (1)

The action is run in the context of the NetworkService Account.

LocalService (2)

The action is run in the context of the LocalService Account.

LocalSystem (3)

The action is run in the context of the LocalSystem Account.

ShouldLogError

Data type: boolean

Access type: Read/write

If true, error codes from executed commands are logged in the event log. This property defaults to false.This property is used if the Type property is 3 (Command. See the LogResult property of IFsrmActionCommand.

Subject

Data type: string

Access type: Read/write

The subject of the email. This property is used (and required) if the Type property is 2 (Email) and is limited to 1 KB.

Type

Data type: uint32

Access type: Read/write

The type of the action, which determines the action that is taken in response to a quota or file screen event. See the FsrmActionType enumeration.

Event (1)

The Action is an event logged to the Application event log.

Email (2)

The Action is an email.

Command (3)

The Action is to run a command or script.

Report (4)

The Action is to generate a report.

WorkingDirectory

Data type: string

Access type: Read/write

The working directory in which the executable program or script will run. This property is used if the Type property is 3 (Command.) See the WorkingDirectory property of IFsrmActionCommand.

Remarks

Not all action types support every property in the class. The table below indicates which properties in this class are supported by each action type in the Type property.

Property/Type Event (1) Email (2) Command (3) Report (4)
MailTo Yes No No Yes
MailCC Yes No No No
MailBCC Yes No No No
Subject Yes No No No
Body Yes Yes No No
EventType No No No No
IncludeFileList No No No No
Command No No Yes No
WorkingDirectory No No Yes No
Parameters No No Yes No
SecurityLevel No No Yes No
KillTimeOut No No Yes No
ShouldLogError No No Yes No
ReportTypes No No No Yes

Requirements

Minimum supported client
None supported
Minimum supported server
Windows Server 2012
Namespace
Root\Microsoft\Windows\FSRM
MOF
MSFT_FSRM.mof
DLL
SrmSvc.dll

See also

FSRM WMI Classes