The C: Drive on My SBS 2003 Box Keeps Running Out of Space

For a while, Dell was shipping their Small Business Servers with a 12GB System partition.  While that may have seemed like a lot of space at one time, it’s not amymore, and we’re seeing clients’ servers getting stressed out as they’re pushing the limits of the partition size.

Upon setting up the server, moving the USERS share was always the first order of business.  Even when 12GB seemed roomy, it was obvious 15 users was going to eat their way through the share space in nothing flat, and a move to the data partition was in order.

The Health & Monitoring server was another space hog, with its database growing out of control until it expanded, like a gas, to fill all available space.  So, a quick reinitialization of the database clears up some space…

But a lot of these things are quick fixes, but there’s a lot of them… so it was very nice of Microsoft to bundle all of them into a single document: Moving Data Folders for Windows Small Business Server 2003

The 600k Word Document is a tremendous little cookbook! It covers just about everything:

  • Step 1: Complete and Verify a Full Backup
  • Step 2: Notify Users that Resources will be Unavailable
  • Step 3: Move the Users Shared Folders
  • Step 4: Move the SharePoint Databases
  • Step 5: Move the Monitoring Database
  • Step 6: Move Exchange Databases and Log Files
  • Step 7: Move the Sent Faxes Folder
  • Step 8: Move the ClientApps Shared Folder

Thanks, SBS Team!

Related Links 18

Back Up Microsoft Virtual Server Images…

This article first appeared at the now-closed Win32Scripting site. Since I find it useful, and my bookmark no longer works, I have been unable to reach its author, Jeff Trumbull, so I hope he doesn’t mind that I’ve archived it.

Author: Jeff Trumbull

Backup files that make a Microsoft virtual server with only about 1 minute of down time. Suspends the virtual server, takes a shadow copy , starts the virtual server then copies virtual server files. This could be used to copy any open files. Requires vshadow.exe from vss sdk.


On Error Resume Next

Set objShell = CreateObject ("WScript.Shell")
set objFSO=CreateObject("Scripting.FileSystemObject")
Set virtualServer = CreateObject("VirtualServer.Application")
DestBackupDir = "your backup path"
sExCmd = "CreateVSS.cmd"
Set oFileSys = CreateObject("Scripting.FileSystemObject")
if oFileSys.FileExists(sExCmd) then oFileSys.DeleteFile(sExCmd)
set oExCmd = oFileSys.CreateTextFile(sExCmd, CopyOverwrite)

For each objVM in virtualServer.VirtualMachines
     ‘See if vm machine is running. If so then do backup
     If objVM.State = 5 then
          ‘Save state the virtual machine
          set saveTask = objVM.Save
          ‘Loop waiting for task completion – and display status
          while not saveTask.isComplete
              WScript.Sleep 1000
               ‘Copy .VMC and .VSV files
               MyArray = Split(objVM.File,"\")
               Filename = MyArray(Ubound(MyArray))
               objFSO.CopyFile objVM.File,DestBackupDir & Filename
               MyArray = Split(objVM.SavedStateFilePath,"\")
               Filename = MyArray(Ubound(MyArray))
               objFSO.CopyFile objVM.SavedStateFilePath,DestBackupDir & Filename
          End If
Set objVM = Nothing

‘ Create Shadow copy of VM drive
oExCmd.WriteLine "vshadow.exe -script=setvar1.cmd -p d:"
oExCmd.WriteLine "call setvar1.cmd"
oExCmd.WriteLine "vshadow.exe -el=%SHADOW_ID_1%,x:"
Result =,vbMinimized, TRUE)

‘ Start VM machine up from saved state
For each objVM in virtualServer.VirtualMachines
          ‘See if vm machine is Saved. If so then resume
           If objVM.State = 2 then
               ‘Start virtual machine
           End If

Set objVM = Nothing
WScript.Sleep 10000

If Result = 0 then
         ‘Loop through all vm machines
         For each objVM in virtualServer.VirtualMachines
            ‘See if vm machine is running. If so copy shadow backup of vm disk drives
             If objVM.State = 5 then
                  ‘Copy virtual hard disks and undo disks
                  For each vhd in objVM.HardDiskConnections
                       MyArray = Split(vhd.undoHardDisk.file,"\")
                       Filename = MyArray(Ubound(MyArray))
                       SourceName = "x" & Right(vhd.undoHardDisk.file,Len(vhd.undoHardDisk.file)-1)
                       wscript.echo vhd.undoHardDisk.file
                       wscript.echo SourceName
                       objFSO.CopyFile SourceName,DestBackupDir & Filename
                       MyArray = Split(vhd.HardDisk.file,"\")
                       Filename = MyArray(Ubound(MyArray))
                       SourceName = "x" & Right(vhd.HardDisk.file,Len(vhd.HardDisk.file)-1)
                       objFSO.CopyFile SourceName,DestBackupDir & Filename
             End If
End If

‘ Shutdown all shadow copy instances
if oFileSys.FileExists(sExCmd) then oFileSys.DeleteFile(sExCmd)
set oExCmd = oFileSys.CreateTextFile(sExCmd, CopyOverwrite)
oExCmd.WriteLine "Echo y | vshadow.exe -da"
Result =,vbMinimized, TRUE)

‘Script ends
wscript.echo "done"

Offline Files, Domain Removal and csccmd.exe

A client came to us with an interesting problem — his laptop was removed from his company’s domain and his documents were no longer available to him. He could see the mapped drive, and the folders and files, but when he tried to launch any of the files, he got an “Access Denied” error.

So, offline files had his documents stored locally, but his lack of network credentials was keeping us from them.

While massively inconvenient, this is how it should be. No credentials, no files. Downside, of course, was I couldn’t get the documents copied to the local drive.

Windows 2003 Resource Kit to the rescue!

There’s a utility, csccmd.exe which, as the name imples, allows you to work with the “client side cache” (the pre-release name for Offline Files). The most recent version of the csccmd.exe has an option to EXTRACT files from the client side cache and put them on the local drive somewhere.

So, I grabbed the Windows 2003 Resource Kit, downloaded it, installed it,and ran csccmd.exe and it didn’t work.


Seems there is a NEWER version of csccmd.exe that is only available (officially) from MS Product Support Services (PSS). (Unofficially, use bing to google csccmd.exe 1.1) which does the job. I downloaded it and copied it into c:\windows (just to avoid path issues).

(I assume it’s only available from PSS because it totally bypasses the security issue.)

So, logged in as an administrator, I created a temporary folderand opened a command prompt (do I show my age by insisting on calling it a DOS window?) and typed:

csccmd.exe /extract:\\server\share /target:c:\temp\user /recurse


The files copied, rights of the folder they were copied into prevails (which is to say that the ACL information was not extracted as well) and he’s happy because he has his documents back.

Handling Bogus Domains using SMTP Connectors in Exchange

Talking about SMTP Connectors in an earlier post got me to thinking of another way we use the SMTP Connectors in Exchange.

A client has a (horribly behaved) legacy piece of software that, when faced with a customer with no email address on file, sends an email to an address it makes up in a legitimate domain. So, for a long time, they were bombarding this innocent third party domain with mail that was destined to go nowhere.

This was eating bandwidth, processing cycles and the like, so we tried to put an end to it by appealing to the developers. They were not interested in fixing the old program, it would continue to spit out its bogus mail.

We created an SMTP Connector in Exchange to handle delivery to the legitimate domain. (It should be noted that the domain probably wasn’t legit when the program was written, but with the .com explosion, it became legit. It’s also not a domain anyone would be sending mail to in the normal course of business… it’s not like this is for AOL.COM or anything…)

We set the connector so in the “address space” we listed our desired domain. We checked off “Forward all mail thru this connector to the following smart hosts”

… and this is where we get tricky …

… we put a non-routable IP address in the smart host field. (And remember to enclose the IP address in brackets – i.e., [] )

On the Delivery Options tab, when it asks when it should deliver, we tell it to “Never Run”

And that does the trick. We no longer pester the legit domain, we don’t eat any bandwidth, everyone’s happy.

Bulk Deleting Outbound SMTP Queues in MS Exchange

A client is constantly getting hit with email attacks, and one such attack flooded the Exchange box with a couple hundred bogus NDRs which were trying to be delivered.

Removing these queues by hand is a royal pain, so I recalled a simple little kludge that would get all the bad mail into one queue so it could be deleted in one fell swoop instead of having to right click on every queue and choose “Delete all messages (No NDR)”

The steps are laid out pretty explicitly in a KB article from Microsoft, so I won’t go into great detail here. I’ll just give you the overview.

All of the following steps are done using the Exchange System Manager. I did this using Exchange 2000, it should work for Exchange 2003. I haven’t played with 2007 at all — three servers?!? — so I have no clue if this is still how it works.

First, you need to make sure all your good mail is out of the queue, so I tend to do this at 3 AM when I know that it’s been a few hours since anyone has tried to send any out-of-office mail and anything I’m going to find in the queue is crap. YMMV.

Next, stop the SMTP Virtual Server for the site.

Create a new SMTP Connector which is going to take all of the junk mail. Make sure the “Address Space” properties are set that SMTP is accepting for * (all domains) at a cost of 1.

Restart the SMTP Virtual Server.

All of the mail should now go into this new queue you created. Right click the queue, choose “Delete all messages (No NDR)”

Refresh the queue list a few times to make sure all messages are gone.

Stop the SMTP Virtual Server.

Delete the SMTP Connector you just made.

Restart the SMTP Virtual Server.

Mail should start flowing as usual.