Delete Old Files

I’ve been working with Brightstor 11.5 SP2 Disk Staging Option lately.  We’ve configured it to purge old staging data according to a policy.  Unforunately, we’ve found that it only automatically purges data if the associated backup ran perfectly.  Of course, being a CA product, this is a rare event.  Hence our disk fills up with unwanted data and prevents future backups when the disk fills.
 
My solution is to purge old data using a script.  I found something very similar to what I wanted on Tek-Tips by a poster called "monsterjta".  After a little tweaking, I had what I wanted:
 
Option Explicit
on error resume next
    Dim oFSO
    Dim sDirectoryPath
    Dim oFolder
    Dim oFileCollection
    Dim oFile
    Dim iDaysOld
    Dim CurDir
 
‘Definitions
    Set oFSO = CreateObject("Scripting.FileSystemObject")
    sDirectoryPath = CreateObject("WScript.Shell").CurrentDirectory
 
‘Set the age (in days) for files to be deleted in E:D2DFulls
    iDaysOld = 6
    sDirectoryPath = "E:D2DFulls"
    set oFolder = oFSO.GetFolder(sDirectoryPath)
    set oFileCollection = oFolder.Files
    DelOldFiles oFileCollection, iDaysOld
 
‘Set the age (in days) for files to be deleted in E:D2DDiffs
    iDaysOld = 5
    sDirectoryPath = "E:D2DDiffs"
    set oFolder = oFSO.GetFolder(sDirectoryPath)
    set oFileCollection = oFolder.Files
    DelOldFiles oFileCollection, iDaysOld
Function DelOldFiles (oFileCollection, iDaysOld)
‘Walk through each file in this folder collection.
    For each oFile in oFileCollection
        If oFile.DateLastModified < (Date() – iDaysOld) and NOT oFile.name = "HEADER.CTF" Then
            oFile.Delete(True)
‘ The following line is commented out.  It can be run for testing.
‘     wscript.echo "This file should be deleted: " & oFile.name
        End If
    Next
End Function
 
This script runs as a scheduled task on the backup server.  The highlighted sections are set up to match the data retention/purge policy in Disk Staging Option.

Availability

My current contract ends on December 29th and I’ll be available for new contracting roles in January.  Give me a shout on website <at> highwaycsl.com if you’re interested in bringing me in.  You’ll find my CV/resume on my personal website.
 
If you’ve got serious project work to be done that requires a senior engineer, you want to listen to expertise, have a budget and have a plan then give me a shout.

TechNet Magazine: December 2006

TechNet Magazine, a free publication, has just released their December 2006 issue.  You can download this as a help file.  This month, it focuses on Exchange 2007:
 
  • Upgrading to Exchange 2007
  • Exchange Management Shell
  • Exchange and Outlook
  • Mobility
  • Journaling
  • Spam and Phishing

The usual other stuff is also covered.

Exchange 2007 is a major improvement in an already excellent product:

  • Each server is role based, i.e. it only has the required components installed.
  • Architecture is much easier.  Finally, MS has realised that they might as well use the physical architecture as provided by AD Sites and Services instead of reinventing the wheel with routing groups and connectors.
  • Unified Messaging integrates fax and voice mail with your inbox.  You can even check your mail over the phone!  Majoe telecoms players are quickly lining up behind UM.

Exchange 2007 will probably RTM in mid December and be generally available in late January or mid February.  MSVL, MSDN and TechNet customers will probably have it within 7 days of RTM.  MS is holding Vista, Office and Exchange launch events around the globe right now so it might be worthwhile checking their Events site for a show near you.  MS Ireland will hold their event on December 5th in Croke Park … the day event is invite only and the night events (2 * 1.5 hours) are open to requests (the early one is already booked out).

Group Policy Power Management

I was having a read of this month’s TechNet Ireland Newletter from Colm Torris (MS Northern Ireland) when I saw a link for controlling power management on Windows XP using Group Policy.  This is something that pops up on the Minasi Forum about twice a year.  The link was for a solution called EZ GPO from Energy Star.  You’ll know Energy Star from the little blue logo often found on Monitors and PC’s.  I actually remember someone mentioning this on MR&D before but I’d never followed up. 

On this page you’ll also find some whitepapers that illustrate how you can save money by saving power.  This sort of thing is worth checking out.  On a past job, we decided to go with more expensive TFT’s over CRT’s not only for space savings but also because over a year, we calculated that they could actually save the company money.
 
EX GPO is a free solution so you can’t argue with that.  You install a service on your PC (you’ll likely want to include it in an image or deploy using something like SMS 2003).  This agent is required because power settings are per user and require administrator access.  You then define group policy using an included GPO ADM template. 
 
You’ll now be able to manage power settings for your desktop and laptop network and save lots of money on power while helping to save the planet.

Windows Automated Installation Kit

The WAIK has been released by Micorosft.  Anyone looking to do network, unattended or WDS (Windows Deployment Services) installations of Windows Vista will need to download this kit.

Unattended installations have changed a lot.  The old unattend.txt has gone by the wayside, to be replaced by unattend.xml.  Vista installations are componnent based and takes places in a number of phases.  This has to be understood and the new XML unattend file can handle it.  Vista installations are also "image" based.  It’s bit level imaging like ghost, more like file imaging.  There’s who new ways to install additional drivers and applications.  You’ve also got Windows PE, a replacement for DOS in the pre-installation phase for preparing your machine and downloading an image from the network.  This appears to be included in WAIK.

Whatever way you intend to deploy Vista, make sure you download this kit.  You will find it’s a tough trawl at first, if it’s anything like the beta release, but it is worth it in the end.

WDS: More To Come

I’ve been asking around and doing loads of reading today and I’ve decided there’s more I need to do on the WDS document.  I’ve got to spend more time looking at the two unattend answer files that I would use, the 7 phases of Vista installation, adding drivers to BOOT.WIM, INSTALL.WIM and adding drivers for plug and play.  Most of the material will come from WAIK, the Windows Automated Installation Kit.

I’ll hopefully get cracking on the lab work for that this week.

Windows Deployment Services

I’ve just finished typing up a whitepaper on Windows Deployment Services (WDS).  This will replace RIS on Windows 2003 SP2 and will be included instead of RIS in WIndows “Longhorn”.  This guide will serve as a primer to WDS and Windows Vista deployment via one of Microsoft’s recommended mechanisms.

Since Windows 2000 Server, we have had a technology available to us from Microsoft to quickly, and with little effort, build machines via the network. This technology was called Remote Installation Services or RIS. Few have ever heard of RIS. For most, it’s one of those subjects that only comes up in a few MCP exam questions. However, a few of us found this technology to be very useful.

What was RIS? RIS mixes the unattended setup, with network installations via a PXE boot up. Most of us will know PXE as that annoying prompt asking you to press <F12> to boot from the network. If you have RIS set up, you can press <F12>, log into a client, select an “image” (which is really an I386 folder associate with an unattended answer script) and walk away knowing that your PC would be built and added to your domain without any further effort on your part. Added to that, using an extension of RIS called RIPREP, you could actually deploy images of PC’s that included applications in them.

This sounds a bit like Ghost? Slightly, but it is different. Ghost is a bit level cloning tool. It also requires licensing for every machine that you build … something many organisations choose to ignore, I’m fairly sure. It also requires that you be careful with SID duplication so you have to make use of tools such as SYSPREP. Plain RIS images are really nothing more than a copy of the I386 folder from the Operating System CD, maybe some drivers added, and one or maybe a set of answer files for performing an automated or completely unattended setup. It’s not a clone at all; it’s a traditional setup. How doe RIS and Ghost compare? Ghost is quicker for deploying operating systems but it does cost money to use legally. RIS is free to use but does take slightly longer to deploy the operating system. An added advantage of RIS is that its close integration into Windows and Active Directory allow you to join the computer to the domain, choose the OU where the computer account should be placed and use customisable computer naming standard using Active Directory as your database.

Windows 2003 Service Pack 2 brings about a change for RIS users. Due to the release of Windows Vista, Microsoft is replacing RIS with Windows Deployment Services. WDS will provide legacy support for RIS (it upgrades cleanly) but it will also provide support for WinPE deployments of Vista’s Windows Imaging (WIM) file format via PXE deployments. WDS will also be a part of Windows “Longhorn” Server.

With this document, I hope to describe some of the fundamentals of WDS as included with Windows 2003 Service Pack 2.

Note: This document is based on the Beta Refresh of Windows 2003 Service Pack 2.

The document continues …

Windows Vista Step-by-Step Guides for IT Professionals

Bink has privided a link to Microsoft’s newly released set of guides for Administrators who are new to Windows Vista.  The guides included are:
 
  • Deploying Vista Step by Step Guide
  • Managing Group Policy ADMX Files Step by Step Guide
  • Managing Roaming User Data Deployment Guide
  • Netsh Commands for Wired Local Area Network
  • Performance Monitoring and Tuning Step by Step Guide
  • Print Management Step by Step Guide
  • Step by Step Guide to Controlling Device Installation and Usage with Group Policy
  • Step by Step Guide to Device Driver Signing and Staging
  • Step-by-Step Guide to Managing Multiple Local Group Policy
  • User Account Control Step by Step Guide
  • Windows BitLocker Drive Encryption Step-by-Step Guide
  • Windows Vista Beta 2 Migration Step by Step Guide
  • Windows Vista Beta 2 Trusted Platform Module Services Step by Step Guide
  • Windows Vista Multilingual User Interface Step by Step Guide
  • Windows Vista Speech Recognition Step by Step
  • Windows Vista Windows Meeting Space Step by Step Guide
  • Winlogon Notification Packages Removed Impact on Windows Vista Planning and Deployment
I seriously need to sit down for a whiel and get to read a lot of this stuff.  I’m half beginning to hope that I don’t get a new contract immediately in January so I do get to catch up.  These guides will do in the interim while waiting for Mark Minasi’s two Vista books.

Vista RTM Available For Download

Credit goes to Paul Williams (Active Directory MVP and serious whiz) for the heads up on this one.  Over the last 3 days we’ve seen Windows Vista become available on MSVL and MSDN.  This morning, both the x64 and x86 editions appeared for download on TechNet.
 
I guess I’ll have to break my PC this weekend 🙂 … assuming it downloads in time.  The downloads are DVD ISO images.  The X86 edition is 2555MB and the x64 edition is 3621MB.  The TechNet download includes several versions of the OS:
 
  • Windows Vista Business
  • Windows Vista Business N
  • Windows Vista Home Basic
  • Windows Vista Home Basic N
  • Windows Vista Home Premium
  • Windows Vista Ultimate

The license key you input during the installation determines which version is installed.  Neither of the N version keys are available at the moment.  I doubt anyone outside of the EU offices in Brussels will give a $&!% about that.