Set objSysInfo = CreateObject("ADSystemInfo") Set objUser = GetObject("LDAP://" & objSysInfo.UserName) Set objComputer = GetObject("LDAP://" & objSysInfo.ComputerName) 'strMessage = objComputer.Description 'strMessage = objComputer.Mail strMessage = objUser.msExchMailboxGuid strMessage = GuidToString(strMessage) &"@yourdomain.com" WScript.Echo strMessage Set objFileToWrite = CreateObject("Scripting.FileSystemObject").OpenTextFile("d:\guid.txt",2,true) objFileToWrite.WriteLine(strMessage) objFileToWrite.Close Set objFileToWrite = Nothing 'objUser.Description = strMessage 'objUser.SetInfo 'objComputer.Description = strMessage 'objComputer.SetInfo Function HexByte(b) HexByte = Right("0" & Hex(b), 2) End Function Function GuidToString(ByteArray) Dim Binary, S Binary = CStr(ByteArray) ' S = "{" S = S & HexByte(AscB(MidB(Binary, 4, 1))) S = S & HexByte(AscB(MidB(Binary, 3, 1))) S = S & HexByte(AscB(MidB(Binary, 2, 1))) S = S & HexByte(AscB(MidB(Binary, 1, 1))) S = S & "-" S = S & HexByte(AscB(MidB(Binary, 6, 1))) S = S & HexByte(AscB(MidB(Binary, 5, 1))) S = S & "-" S = S & HexByte(AscB(MidB(Binary, 8, 1))) S = S & HexByte(AscB(MidB(Binary, 7, 1))) S = S & "-" S = S & HexByte(AscB(MidB(Binary, 9, 1))) S = S & HexByte(AscB(MidB(Binary, 10, 1))) S = S & "-" S = S & HexByte(AscB(MidB(Binary, 11, 1))) S = S & HexByte(AscB(MidB(Binary, 12, 1))) S = S & HexByte(AscB(MidB(Binary, 13, 1))) S = S & HexByte(AscB(MidB(Binary, 14, 1))) S = S & HexByte(AscB(MidB(Binary, 15, 1))) S = S & HexByte(AscB(MidB(Binary, 16, 1))) ' S = S & "}" GuidToString = S End Function