Share via


MSFT_FSRMFileManagementJob class

Defines a file management job. The job specifies a schedule, conditions, a command or actions to execute if a file meets all the conditions, user notifications, and reporting.

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

Syntax

[dynamic, provider("FSRMWmiProvider")]
class MSFT_FSRMFileManagementJob
{
  string                   Name;
  string                   Description = "";
  string                   Namespace[];
  boolean                  Disabled = False;
  MSFT_FSRMFMJCondition    Condition[] = {};
  MSFT_FSRMFMJAction       Action = null;
  uint32                   ReportFormat[] = {Dhtml, Xml};
  string                   MailTo = "";
  uint32                   ReportLog[] = {};
  MSFT_FSRMFMJNotification Notification[] = {};
  boolean                  Continuous = False;
  boolean                  ContinuousLog = False;
  uint64                   ContinuousLogSize;
  string                   Parameters[] = {};
  uint32                   Status;
  datetime                 LastRun;
  string                   LastReportPath;
  uint32                   Flags[];
  MSFT_FSRMScheduledTask   Schedule;
  string                   TaskName;
  string                   LastError;
};

Members

The MSFT_FSRMFileManagementJob class has these types of members:

Methods

The MSFT_FSRMFileManagementJob class has these methods.

Method Description
Start Starts the file management job.
Stop Stops the running instance of a file management job.
Wait Waits for the specified period of time or until the file management job has finished running.

Properties

The MSFT_FSRMFileManagementJob class has these properties.

Action

Data type: MSFT_FSRMFMJAction

Access type: Read/write

Qualifiers: EmbeddedInstance ("MSFT_FSRMFMJAction")

An instance of the MSFT_FSRMFMJAction class representing a file management job action object. Required. The default value is null.

Condition

Data type: MSFT_FSRMFMJCondition array

Access type: Read/write

Qualifiers: EmbeddedInstance ("MSFT_FSRMFMJCondition")

A list of instances of the MSFT_FSRMFMJCondition class representing file management job condition objects. Optional. The default value is an empty list. If the Continuous property is True then the Property properties of the MSFT_FSRMFMJCondition instances must not contain "File.DateCreated""File.DateLastModified", or "File.DateLastAccessed".

Continuous

Data type: boolean

Access type: Read/write

If True, enables the real time file management task. Optional. The default value is False. If this property is True then the Property properties of the MSFT_FSRMFMJCondition instances in the Condition property must not contain "File.DateCreated", "File.DateLastModified", or "File.DateLastAccessed".

ContinuousLog

Data type: boolean

Access type: Read/write

If True, enables the real time classification logs. Optional. The default value is False. This property should only be specified if the Continuous property is True.

ContinuousLogSize

Data type: uint64

Access type: Read/write

The maximum size to which a real time file management job log may grow. Optional. The default value is 0. This property should only be specified if the Continuous property is True.

Description

Data type: string

Access type: Read/write

A string up to 10KB in size. Optional. The default value is an empty string.

Disabled

Data type: boolean

Access type: Read/write

If True, the file management job is disabled. The default value is False.

Flags

Data type: uint32 array

Access type: Read-only

Array of flags describing the file management job.

Deprecated (1)

The rule is deprecated.

LastError

Data type: string

Access type: Read-only

TBD

LastReportPath

Data type: string

Access type: Read-only

The path of the last report generated for this file management job.

LastRun

Data type: datetime

Access type: Read-only

When the file management job was last run.

MailTo

Data type: string

Access type: Read/write

A semicolon-separated list of email addresses. "[Admin Email]" is an acceptable email address. The default value is an empty string. This member is optional.

Name

Data type: string

Access type: Read/write

Qualifiers: key

The name of the file management job.

Namespace

Data type: string array

Access type: Read/write

An array of strings that represent either valid local paths to a folder on the server or valid values for the server's definition of FolderUsage. If providing FolderUsage properties, the format "[Folder Usage_MS=value]" must be used. Strings must not exceed the MAX_PATH length. This member is required.

Notification

Data type: MSFT_FSRMFMJNotification array

Access type: Read/write

Qualifiers: EmbeddedInstance ("MSFT_FSRMFMJNotification")

A list of instances of the MSFT_FSRMFMJNotification class representing file management job notification objects. Optional. The default value is an empty list.

Parameters

Data type: string array

Access type: Read/write

A list of strings of the format "<name>=<value>", as accepted by the Parameters property of the IFsrmFileManagementJob interface. Optional. The default value is an empty list.

ReportFormat

Data type: uint32 array

Access type: Read/write

The formats of the classification report being generated. The default value is {Dhtml, Xml}.

DHtml (1)

The report is in Dynamic HTML format.

Html (2)

The report is in HTML format.

Text (3)

The report is in text format.

Csv (4)

The report is in CSV format.

Xml (5)

The report is in XML.

ReportLog

Data type: uint32 array

Access type: Read/write

The types of logs being generated for classification. The default value is an empty list. This member is optional.

Error (1)

Information (2)

Audit (4)

Schedule

Data type: MSFT_FSRMScheduledTask

Access type: Read/write

Qualifiers: EmbeddedInstance ("MSFT_FSRMScheduledTask")

A MSFT_FSRMScheduledTask instance that represents the schedule for this file management job.

Status

Data type: uint32

Access type: Read-only

The running status of file management job.

NotRunning (1)

The job is not running.

Queued (2)

The job has been queued.

Running (3)

The job is running.

TaskName

Data type: string

Access type: Read/write

TBD

Remarks

When a file management job runs, it scans the files in the specified folders and if a file in the folder meets the conditions specified by the job, FSRM moves the file to the specified expired files folder if the type is expiration, or runs the custom action if defined. If notifications or actions are specified, FSRM sends the notifications and performs the actions.

FSRM performs a logical AND on all the conditions to determine if the file meets those conditions.

FSRM does not expire files in the system directories (for example, \Windows and \System Volume Information).

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