Skip to content

FSRMFileScreen

dscbot edited this page Jun 16, 2024 · 3 revisions

FSRMFileScreen

Parameters

Parameter Attribute DataType Description Allowed Values
Path Key String The path this FSRM File Screen applies to.
Description Write String An optional description for this FSRM File Screen.
Ensure Write String Specifies whether the FSRM File Screen should exist. Present, Absent
Active Write Boolean Boolean setting that controls if server should fail any I/O operations if the File Screen is violated.
IncludeGroup Write StringArray[] An array of File Groups to include in this File Screen.
Template Write String The name of the FSRM File Screen Template to apply to this path.
MatchesTemplate Write Boolean Causes the template to use only the template name and Active and Ignore Groups parameters.

Description

This resource is used to configure File Screens in File Server Resource Manager.

Examples

Example 1

This configuration will assign an Active FSRM File Screen to the path 'D:\Users' with three include groups. An e-mail and event action is bound to the File Screen.

Configuration FSRMFileScreen_Config
{
    Import-DscResource -Module FSRMDsc

    Node localhost
    {
        FSRMFileScreen DUsersFileScreen
        {
            Path         = 'd:\users'
            Description  = 'File Screen for Blocking Some Files'
            Ensure       = 'Present'
            Active       = $true
            IncludeGroup = 'Audio and Video Files', 'Executable Files', 'Backup Files'
        } # End of FSRMFileScreen Resource

        FSRMFileScreenAction DUsersFileScreenSomeFilesEmail
        {
            Path      = 'd:\users'
            Ensure    = 'Present'
            Type      = 'Email'
            Subject   = 'Unauthorized file matching [Violated File Group] file group detected'
            Body      = 'The system detected that user [Source Io Owner] attempted to save [Source File Path] on [File Screen Path] on server [Server]. This file matches the [Violated File Group] file group which is not permitted on the system.'
            MailBCC   = ''
            MailCC    = '[email protected]'
            MailTo    = '[Source Io Owner Email]'
            DependsOn = "[FSRMFileScreen]DUsersFileScreen"
        } # End of FSRMFileScreenAction Resource

        FSRMFileScreenAction DUsersFileScreenSomeFilesEvent
        {
            Path      = 'd:\users'
            Ensure    = 'Present'
            Type      = 'Event'
            Body      = 'The system detected that user [Source Io Owner] attempted to save [Source File Path] on [File Screen Path] on server [Server]. This file matches the [Violated File Group] file group which is not permitted on the system.'
            EventType = 'Warning'
            DependsOn = "[FSRMFileScreen]DUsersFileScreen"
        } # End of FSRMFileScreenAction Resource
    } # End of Node
} # End of Configuration

Example 2

This configuration will assign the 'Block Some Files' file screen template to the path 'D:\Users'. It will also force the File Screen assigned to this path to exactly match the 'Block Some Files' template. Any changes to the actions, include groups or active setting on the File Screen assigned to this path will cause the File Screen to be removed and reapplied.

Configuration FSRMFileScreen_UsingTemplate_Config
{
    Import-DscResource -Module FSRMDsc

    Node localhost
    {
        FSRMFileScreen DUsersFileScreens
        {
            Path            = 'd:\users'
            Description     = 'File Screen for Blocking Some Files'
            Ensure          = 'Present'
            Template        = 'Block Some Files'
            MatchesTemplate = $true
        } # End of FSRMFileScreen Resource
    } # End of Node
} # End of Configuration