Sunday, July 4, 2010

Exchange and Server Naming

I worked for an organisation once that had a naming convention for its servers that constituted:
  • a country code (2 alpha)
  • a location code (3 alpha)
  • a server type code (2 alpha)
  • an instance number (2 numeric)
This was fine as naming conventions go (although these days I personally prefer location independent naming conventions as modern servers can so easily and quickly be relocated).

Unfortunately, this resulted in a server name of AUTHOMS01. You might look at this and think "Okay, no problem" and you would be right, unless you installed Exchange on the server.

We couldn't for the life of us figure out why Exchange would not complete SMTP transactions even though the answer was staring us in the face. It turned out that whenever the server communicated with a destination server, the transaction stopped whenever the AUTHOMS01 server presented itself.... because SMTP saw the first four letters of the server name as a valid SMTP command: AUTH.

So take care not to name your mail servers with a name that starts with a valid SMTP command!

Cheers,
Sean

Locating Encrypted Files

When undertaking a file migration project between Active Directory domains and forests, it's necessary to locate any EFS encrypted files in order to decrypt them prior to the decommissioning of the old domain and the loss of the keys.

I located this handy script that will identify encrypted files in a volume (just change the drive letter as necessary):

strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
     & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")

Set colFolders = objWMIService. _
     ExecQuery("Select * from Win32_Directory where Drive='C:'" _
              & " AND Encrypted=True")

For Each objFolder in colFolders
     Wscript.Echo "Name: " & objFolder.Name
     Wscript.Echo "Path: " & objFolder.Path
Next