Duplicating FSRM quota and file screen templates and settings to multiple servers
With R2 Microsoft introduces, amongst others, the File Server Resource Manager (FSRM). With that MMC you define, configure and manage quotas and file screens. On a R2 server with the FSRM installed you can configure the following:
* FSRM Global Options
* Quota and Screening Templates
* Quota and Screening Settings for directories
However at this moment, if you have multiple servers you want to configure all the servers the same way, there is no way to do this through the GUI. To be able to distribute templates and settings command line tooling must be used.
With the FSRM the following three command line tools are available:
* dirquota.exe
* Can be used to define, configure and manage quotas on directories, quota templates and global options
* filescrn.exe
* Can be used to define, configure and manage file screen (exceptions) on directories, file screen templates and global options
* storrept.exe
* Can be used to define, configure and manage reports
If you want to configure templates on multiple servers whereas all those servers use the same template settings you can use one of the 2 possible ways to accomplish that
(1) configuring all servers through the command line
First think about all the custom templates (quota and file screening) you need and translate those into command lines in a batch file using the commands "dirquota template add" and "filescrn template add" and "filescrn filegroup add". The command line options for both are listed below. There is no need to run this on each server as you can run the commands in the batch from 1 server against remote servers using the /REMOVE:<server> option
(2) configuring one server and export/import those settings onto other servers
First think about all the custom templates (quota and file screening) you need and configure one server through the GUI using the FSRM MMC. After configuration has been done. Export the template settings to a XML file using the command "dirquota template export" for quotas and the command "filescrn template export" for file screens and "filescrn filegroup export" for filegroups. After that use the command "dirquota template import" for quotas and the command "filescrn template import" for file screensand the command "filescrn filegroup import" for filegroups to import the settings into new servers. Again, it is not needed to run this on each server as you can run the commands the export server against remote servers using the /REMOVE:<server> option.
AND if you want to configure the same quotas and file screens on specific directories on multiple servers there is only one way to accomplish that without using the FSRM MMC on each server.
To configure custom settings (autoquotas/quotas and file screenings) on multiple servers you can use the command "dirquota quota add" for quotas, the command "dirquota autoquota add" for autoquotas and the the command "filescrn screen add" for file screens. The command line options are listed below. There is no need to run this on each server as you can run the commands in the batch from 1 server against remote servers using the /REMOVE:<server> option
####DIRQUOTA.EXE####
C:\>dirquota
The syntax of this command is:
Dirquota {Quota | Autoquota | Template | Admin}
Quota List, add, modify, and delete quotas.
Autoquota List, add, modify, and delete auto apply quotas.
Template List, add, modify, and delete quota templates.
Admin Configure settings and perform administrative operations.
The minimum sequence that uniquely identifies a switch can be used as an
abbreviation. For example, "Dirquota q l /list-n" is equivalent to
"Dirquota quota list /list-notifications".
####DIRQUOTA.EXE####
####FILESCRN.EXE####
C:\>filescrn
The syntax of this command is:
Filescrn {Filegroup | Screen | Exception | Template | Admin}
Filegroup List, add, modify, and delete file groups.
Screen List, add, modify, and delete file screens.
Exception List, add, modify, and delete file screen exceptions.
Template List, add, modify, and delete file screen templates.
Admin Configure settings and perform administrative operations.
The minimum sequence that uniquely identifies a switch can be used as an
abbreviation. For example, "Filescrn f l /f:MyFileGroup" is equivalent to
"Filescrn filegroup list /filegroup:MyFileGroup".
####FILESCRN.EXE####
####STORREPT.EXE####
C:\>storrept
The syntax of this command is:
Storrept {Reports | Admin}
Reports List, schedule, modify, delete, generate, and cancel
reports.
Admin Configure settings and perform administrative operations.
The minimum sequence that uniquely identifies a switch can be used as an
abbreviation. For example, "Storrept r l" is equivalent to
"Storrept reports list".
####STORREPT.EXE####
########QUOTA TEMPLATE########
C:\>dirquota template add
Add and configure new quota templates.
The syntax of this command is:
Dirquota Template Add /Template:TEMPLATE_NAME
{/Limit:LIMIT[kb|mb|gb] | /SourceTemplate:TEMPLATE}
[/Type:{Hard|Soft}] [/Label:LABEL] [/Add-Threshold:LEVEL]
[/Add-Notification:LEVEL,NOTIFY_TYPE,CONFIG_FILE]
[/Remote:MACHINE]
/Template:TEMPLATE_NAME Configure quota template with name TEMPLATE_NAME.
/Limit:LIMIT[kb|mb|gb] Impose folder size limit. By default LIMIT is in
KB, but "kb", "mb", and "gb" can be appended
to specify other units.
/SourceTemplate:TEMPLATE Configure quota template from another template
TEMPLATE.
/Type:{Hard|Soft} Make the quota limit hard or soft.
Hard - Limit cannot be exceeded (default)
Soft - Limit can be exceeded
/Label:LABEL Add quota label LABEL.
/Add-Threshold:LEVEL Add notification threshold at utilization
LEVEL %. The switch can be specified multiple
times.
/Add-Notification:LEVEL,NOTIFY_TYPE,CONFIG_FILE
Add notification at threshold. The switch can be
specified multiple times. The parameters to be
used are:
LEVEL - notification threshold
NOTIFY_TYPE - One of the following:
M - E-mail notification
E - Event log notification
C - Command line notification
R - Report notification
CONFIG_FILE - Path to configuration file
/Remote:MACHINE Perform the operation on machine MACHINE.
Use "Dirquota Notification /?" to view configuration file syntax.
Examples:
Dirquota Template Add /Template:"User Quota Template" /limit:500mb
/Add-Notification:100,M,email-quotaexceeded.txt
Dirquota Template Add /Template:"User Quota Template 2"
/SourceTemplate:"User Quota Template" /limit:250mb /Type:Soft
########QUOTA TEMPLATE########
########FILE SCREEN TEMPLATE########
C:\>filescrn template add
Add and configure new file screen templates.
The syntax of this command is:
Filescrn Template Add /Template:TEMPLATE_NAME
{/SourceTemplate:TEMPLATE | /Add-Filegroup:ADD_FG}
[/Type:{Active|Passive}]
[/Add-Notification:NOTIFY_TYPE,CONFIG_FILE] [/Overwrite]
[/Remote:MACHINE]
/Template:TEMPLATE_NAME Configure template with name TEMPLATE_NAME.
/SourceTemplate:TEMPLATE Configure file screen from template TEMPLATE.
/Type:{Active|Passive} Make the file screen active or passive.
Active - Users cannot save unauthorized files
(default)
Passive - Users can save unauthorized files
but notifications will be raised
/Add-Filegroup:ADD_FG Add file group ADD_FG to the list of blocked file
groups for this file screen. The switch can be
specified multiple times.
/Add-Notification:NOTIFY_TYPE,CONFIG_FILE
Add notification. The switch can be specified
multiple times. The parameters to be used are:
NOTIFY_TYPE - One of the following:
M - E-mail notification
E - Event log notification
C - Command line notification
R - Report notification
CONFIG_FILE - Path to configuration file
/Overwrite Overwrite properties if template exists.
/Remote:MACHINE Perform the operation on machine MACHINE.
Use "Filescrn Notification /?" to view configuration file syntax.
Examples:
Filescrn Template Add /Template:"Forbidden Files Template"
/Add-Filegroup:"Audio and Video Files" /Add-Filegroup:"Executable Files"
/Add-Notification:M,email-forbiddenfiles.txt
Filescrn Template Add /Template:"Forbidden Files Warning Template"
/SourceTemplate:"Forbidden Files Template" /Type:Passive /Overwrite
########FILE SCREEN TEMPLATE########
########FILE SCREEN FILEGROUP########
C:\>filescrn filegroup add
Add new file groups.
The syntax of this command is:
Filescrn Filegroup Add /Filegroup:FG_NAME /Members:MEMBERS
[/Nonmembers:NONMEMBERS] [/Remote:MACHINE]
/Filegroup:FG_NAME Add file group with name FG_NAME.
/Members:MEMBERS Configure file group member patterns. MEMBERS is
a list of file name patterns separated by '|'.
/Nonmembers:NONMEMBERS Configure file group non-member patterns.
NONMEMBERS is a list of file name patterns
separated by '|'.
/Remote:MACHINE Perform the operation on machine MACHINE.
Example:
Filescrn Filegroup Add /Filegroup:"Log Files" /Member:"*.log|*.history"
########FILE SCREEN FILEGROUP########
########QUOTA TEMPLATE########
C:\>dirquota template export
Export templates to a file.
The syntax of this command is:
Dirquota Template Export /File:PATH [/Template:TEMPLATE_NAME] [/Remote:MACHINE]
/File:PATH Export quota templates to the file at path PATH.
/Template:TEMPLATE_NAME Export only the template with name TEMPLATE_NAME.
If omitted, all quota templates defined on the
system are exported.
/Remote:MACHINE Perform the operation on machine MACHINE.
Example:
Dirquota Template Export /File:D:\usertemplate.xml
/Template:"User Quota Template"
---------------------------------------------------
C:\>dirquota template import
Import templates from a file.
The syntax of this command is:
Dirquota Template Import /File:PATH [/Template:TEMPLATE_NAME | /Ignore]
[/Remote:MACHINE]
/File:PATH Import quota templates from the file at path PATH.
/Template:TEMPLATE_NAME Import only the template with name TEMPLATE_NAME.
If omitted, all quota templates defined in the
file are imported.
/Ignore Ignore templates that already exist on the
system.
/Remote:MACHINE Perform the operation on machine MACHINE.
Example:
Dirquota Template Import /File:D:\newtemplate.xml /Remote:FILESERVER1
########QUOTA TEMPLATE########
########FILE SCREEN TEMPLATE########
C:\>filescrn template export
Export templates to a file.
The syntax of this command is:
Filescrn Template Export /File:PATH [/Template:TEMPLATE_NAME] [/Remote:MACHINE]
/File:PATH Export templates to the file at path PATH.
/Template:TEMPLATE_NAME Export only the template with name TEMPLATE_NAME.
If omitted, all templates defined on the system
are exported.
/Remote:MACHINE Perform the operation on machine MACHINE.
Example:
Filescrn Template Export /File:D:\filescreens.xml /Remote:FILESERVER1
---------------------------------------------------------
:\>filescrn template import
mport templates from a file.
he syntax of this command is:
ilescrn Template Import /File:PATH [/Template:TEMPLATE_NAME | /Ignore]
[/Remote:MACHINE]
/File:PATH Import templates from the file at path PATH.
/Template:TEMPLATE_NAME Import only the template with name TEMPLATE_NAME.
If omitted, all templates defined in the file are
imported.
/Ignore Ignore templates that already exist on the
system.
/Remote:MACHINE Perform the operation on machine MACHINE.
xample:
Filescrn Template Import /File:D:\screening.xml
/Template:"Document Screening Template"
########FILE SCREEN TEMPLATE########
########FILE SCREEN FILEGROUP########
C:\>filescrn filegroup export
Export file groups to a file.
The syntax of this command is:
Filescrn Filegroup Export /File:PATH [/Filegroup:FG_NAME] [/Remote:MACHINE]
/File:PATH Export file groups to the file at path PATH.
/Filegroup:FG_NAME Export only the file group with name FG_NAME. If
omitted, all file groups defined on the system
are exported.
/Remote:MACHINE Perform the operation on machine MACHINE.
Example:
Filescrn Filegroup Export /File:D:\logfiles.xml /Filegroup:"Log Files"
-----------------------------------------------------------
C:\>filescrn filegroup import
Import file groups from a file.
The syntax of this command is:
Filescrn Filegroup Import /File:PATH [/Filegroup:FG_NAME | /Ignore]
[/Remote:MACHINE]
/File:PATH Import file groups from the file at path PATH.
/Filegroup:FG_NAME Import only the file group with name FG_NAME. If
omitted, all file groups defined in the file are
imported.
/Ignore Ignore file groups that already exist on the
system.
/Remote:MACHINE Perform the operation on machine MACHINE.
Example:
Filescrn Filegroup Import /File:D:\filegroups.xml /Remote:FILESERVER1
########FILE SCREEN FILEGROUP########
########QUOTA DEFINTION########
C:\>dirquota quota add
Add and configure new quotas.
The syntax of this command is:
Dirquota Quota Add /Path:PATH
{/Limit:LIMIT[kb|mb|gb] | /SourceTemplate:TEMPLATE}
[/Type:{Hard|Soft}] [/Label:LABEL]
[/Status:{Enabled|Disabled}] [/Add-Threshold:LEVEL]
[/Add-Notification:LEVEL,NOTIFY_TYPE,CONFIG_FILE]
[/Overwrite] [/Remote:MACHINE]
/Path:PATH Configure quota on path PATH. The following
wildcards are supported:
\. - folder specified by PATH
\* - all immediate subfolders of PATH
/Limit:LIMIT[kb|mb|gb] Impose folder size limit. By default LIMIT is in
KB, "kb", "mb", and "gb" can be appended to
specify other units.
/SourceTemplate:TEMPLATE Configure quota from template TEMPLATE.
/Type:{Hard|Soft} Make the quota limit hard or soft.
Hard - Limit cannot be exceeded (default)
Soft - Limit can be exceeded
/Label:LABEL Add quota label LABEL.
/Status:{Enabled|Disabled} Enable or disable quota.
Enabled - quotas are enforced (default)
Disabled - quotas are disabled
/Add-Threshold:LEVEL Add notification threshold at utilization
LEVEL %. The switch can be specified multiple
times.
/Add-Notification:LEVEL,NOTIFY_TYPE,CONFIG_FILE
Add notification at threshold. The switch can be
specified multiple times. The parameters to be
used are:
LEVEL - notification threshold
NOTIFY_TYPE - One of the following:
M - E-mail notification
E - Event log notification
C - Command line notification
R - Report notification
CONFIG_FILE - Path to configuration file
/Overwrite Overwrite properties if quota exists.
/Remote:MACHINE Perform the operation on machine MACHINE.
Use "Dirquota Notification /?" to view configuration file syntax.
Examples:
Dirquota Quota Add /Path:D:\scratch /limit:50mb
/label:"Scratch Folder Quota"
Dirquota Quota Add /Path:D:\users\bob /SourceTemplate:"User Quota Template"
/Add-Threshold:80 /Add-Notification:80,M,email-warning.txt
------------------------------------------------------------
C:\>dirquota autoquota add
Add and configure new auto apply quotas.
The syntax of this command is:
Dirquota Autoquota Add /Path:PATH /SourceTemplate:TEMPLATE [/Remote:MACHINE]
/Path:PATH Configure auto apply quota on path PATH.
/SourceTemplate:TEMPLATE Configure auto apply quota from template TEMPLATE.
/Remote:MACHINE Perform the operation on machine MACHINE.
Example:
Dirquota Autoquota Add /Path:D:\users /SourceTemplate:"User Quota Template"
########QUOTA DEFINTION########
########FILE SCREEN DEFINTION########
C:\>filescrn screen add
Add and configure new file screens.
The syntax of this command is:
Filescrn Screen Add /Path:PATH
{/SourceTemplate:TEMPLATE | /Add-Filegroup:ADD_FG}
[/Type:{Active|Passive}]
[/Add-Notification:NOTIFY_TYPE,CONFIG_FILE] [/Overwrite]
[/Remote:MACHINE]
/Path:PATH Configure file screen on path PATH. The following
wildcards are supported:
\. - folder specified by PATH
\* - all immediate subfolders of PATH
/SourceTemplate:TEMPLATE Configure file screen from template TEMPLATE.
/Add-Filegroup:ADD_FG Add file group ADD_FG to the list of blocked file
groups for this file screen. The switch can be
specified multiple times.
/Type:{Active|Passive} Make the file screen active or passive.
Active - Users cannot save unauthorized files
(default)
Passive - Users can save unauthorized files
but notifications will be raised
/Add-Notification:NOTIFY_TYPE,CONFIG_FILE
Add notification. The switch can be specified
multiple times. The parameters to be used are:
NOTIFY_TYPE - One of the following:
M - E-mail notification
E - Event log notification
C - Command line notification
R - Report notification
CONFIG_FILE - Path to configuration file
/Overwrite Overwrite properties if file screen exists.
/Remote:MACHINE Perform the operation on machine MACHINE.
Use "Filescrn Notification /?" to view configuration file syntax.
Example:
Filescrn Screen Add /Path:D:\scratch /Type:Passive
/Add-Filegroup:"Audio and Video Files"
/Add-Notification:M,screen-emailadmin.txt
/Overwrite
########FILE SCREEN DEFINTION########