For an overview of File Classification Infrastructure, check Classifying files based on location and content using the File Classification Infrastructure (F... . Previously we showed you how to expire stale data using File Management Tasks in Windows Server 2008 R2 . Now let's look at what else can be done with File Management Tasks.
As stated previously, File Management Tasks are a mechanism to apply a commands to a selected set of files on a scheduled basis. The trick to applying an action other than Expiration to the selected files is simply to change a drop down box on the Task’s Action tab. You can see the default action here:
The other two options in the drop down are "Custom" and "RMS Encryption". With a Custom File Management Task, you can then specify an arbitrary executable with a series of parameters that will be run for each file that matches the conditions of the File Management Task. The only restriction is that the executable as well as the folder structure the command is contained in (as in all parent folders) must be writeable for Administrator and System only. If we did not impose this restriction a non-authenticated user would be able to replace the command being run.
We will now provide an example of using a Custom File Management Task to do something useful. The script we will give essentially:
Copy and paste this script into C:\Windows\System32\MoveCreateLink.ps1:
The following PowerShell will automatically create a Custom File Management Job that uses the MoveCreateLink.ps1 script:
Effectively we built a simple form of Hierarchical Storage management with a few lines of batch scripting. Since this script does alter files, we need to set the custom action to run as Local System. However, if your executable needs lower permissions, you can restrict the account it runs in further.
Now what else can we do this? We could use Custom File Management Tasks to:
Remember that these File Management Tasks are scheduled and can happen as often or as rarely as you would like. Tell us you think you could leverage custom File Management Tasks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.