Archive for March, 2010

Windows 2008 R2 – File Management Tasks

March 10th, 2010

There is a really neat post on Adi Oltean’s Blog concerning the use of Windows 2008 R2′s File Management Tasks (FMTs) to archive data.  He uses a “Custom” task type and refers to a batch script which moves files and leaves a symbolic link.  This is sort of a “poor man’s” HSM solution, admittedly, but still pretty cool and instructive as to what can be accomplished with FMTs (anything you can script!).  His script is below:

if exist "c:\protected\%~pnx1" @echo Target file already exists! & goto :EOF 
md "c:\HSM\%~p1" 
move %1 "c:\protected\%~p1" 
mklink %1 "c:\protected\%~pnx1"

If you are wondering (like I was) what the heck “%~p1″ or “%~pnx1″ means, check out this site.

I set up a similar FMT in my test environment to learn about this technology, but I had problems with Adi’s batch script.  It was hard to debug because it has no logging, so I wrote my own in VBS with lots of logging.  You can download my script here.  Here is how I set up my FMT.

1.  On the General tab enter a task name and the Scope.  The scope is where the FMT run against.

2.   On the Action tab choose “Custom” for the Type.  For the Executable section enter the path to cscript.exe.  In the Arguments section enter the path to the script (download above), and choose the [Source File Path] variable to insert.  Command Security should be set to Local System.

3.  On the Condition tab place a check mark inside the Days since file was last accessed box.  Note the property conditions section of this tab.  Here you can add file classifications you have previously set up.  For a great read on Microsoft’s File Classification Infrastructure read the Storage Team’s blog about itNote, if you want to use “Last Accessed” time for your FMT as I did you need to enable the tracking of this attribute.  This is done by setting HKLM\System\CurrentControlSet\Control\FileSystem\NtfsDisableLastAccessUpdate to 0 (this value is REG_DWORD).  Note that this could impact disk IO performance on busy file servers!

4.  On the Schedule tab enter whatever schedule/frequency is desired.

Finally, use a Windows “Touch” utility (download one here) to alter the Last Accessed date of a file that falls within the scope of the FMT you created.  Then manually run your FMT (Right-click > Run Now) and if all is well the file you altered should be moved and a symbolic link left in it’s place.

System Center Operations Manager 2007 R2 – How to Install a Gateway Server

March 10th, 2010

Installing a Gateway server in your existing OpsMgr environment is a fairly challenging task.  When accomplishing this task for a customer I found many resources which helped, but I could not find one that was complete.  The process I found which was the most helpful was Brad Hearn’s blog.  Much of my documented process comes from his document.  Honestly I would never have gotten my gateways operational without Brad’s excellent post so many thanks!

Download “How to Install a Gateway Server.pdf” here.