Exercise 3: Compacting Stagnant Outlook Files
In this lesson, you will leverage FSRM to set up an automatic monthly job compresses Outlook databases that have not been modified in a year.
Outlook files can take up large amounts of space. With redirected home directories this directly impacts File Servers. To make matters more complicated, users oftentimes have a series of archived Outlook files they keep around. These Outlook files do not change very often and can take up significant amounts of storage capacity.
Part 1: Compacting Stagnant Outlook Files
In FSRM, select File Management Tasks, and click Create File Management Task in the Actions pane:
This opens the Create File Management Task dialog box.
- In the Name text box, enter Compact old Outlook files for the new task.
- Under Scope, add the following directory using the Add button:
C:\Server 2008 R2 Labs\File System Classification Infrastructure\Data\Shares\Users
- Click on the Action tab
Select Custom from the dropdown box labeled Type:
Enter the following application path into the Executable text box:
c:\windows\system32\compact.exe
This command will be invoked for each file that matches the criteria of the File Management Task. Compact.exe can enable and disable NTFS compression for files.
Enter “/c “ into the Arguments text box:
Please note that the is a space after the c
Select [Source File Path] from the drop down box labeled Select variable to insert
Click the Insert Variable button:
The Arguments text box will now contain the text “/C [Source File Path” in it. These parameters will be passed to the command. The “/c” parameter to “compact.exe” indicates that it should compress any files supplied to the command. The “[Source File Path]” string will be replaced with the actual file being acted on when the command is executed.
In the Command security section select Local System:
Without this, the command will not be allowed to make changes to files.
- Click the Condition tab
- Select the check box next to the text Days since last modified and enter the number 365 (equivalent to approximately 1 year) into the text box next to it.
Select the check box next to the text Wildcard pattern matching filename and enter the following text into the text box next to it:
*.pst
- Click on the Schedule tab
- Click Create…, and then in the Schedule dialog box, click New. This displays a default schedule set for 9:00 A.M. daily.
- Select Monthly from the drop down list.
This sets up the schedule to run on the 1st day of every month at 9:00 am.
- Click OK to close the Schedule dialog.
- Click OK to close file management task dialog.
- Open an explorer and navigate to:
C:\Server 2008 R2 Labs\File System Classification Infrastructure\Data\Shares\Users\Bob
Note the size of the outlook file Archive_for_bob.pst and that it hasn’t been modified in a long time:
In FSRM, rightclick on the Compact old Outlook files File Management Task you just created and select Run File Management Task Now:
- Select Wait for task to complete execution and click OK
- Inspect the generated report for files affected by the File Management Task.
Find the file archive_for_bob.pst, right click on it, and select Properties:
Note that the file now takes up much less space according to the label Size on disk.