ForensiT Homepage
Forum Home Forum Home > ForensiT Support > Domain Migration
  Active Topics Active Topics
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Suggestion

 Post Reply Post Reply
Author
Message
  Topic Search Topic Search  Topic Options Topic Options
IH82LUZ View Drop Down
Newbie
Newbie
Avatar

Joined: 17 Dec 2008
Location: Fargo, ND
Online Status: Offline
Posts: 3
  Quote IH82LUZ Quote  Post ReplyReply Direct Link To This Post Topic: Suggestion
    Posted: 05 Jan 2009 at 11:10am
This might have been covered before, but I thought it might be useful information for some people who are starting to migrate their company over to AD.
 
We have our users run a script that launches the migration process.  Periodically this script fails and either the user doesn't tell us or they call us and can't fully explain what the problem is.  What I did was created a VB script called email.vbs. What this does is email me that the process failed and it attaches the log file.  The email comes from their user name on the computer @ the domain, the log file is attached, and it has their computer name in the body of the email. It's greatly helped my troubleshooting.  Here is what's in my email.vbs, not very complicated:
 
on error resume next
wscript.sleep 5000
Set objNetwork = CreateObject("WScript.Network")
sUserID = objNetwork.UserName
sCompID = objNetwork.ComputerName
Dim OBJMail
Set objEmail = CreateObject("CDO.Message")
objEmail.From = sUserID & "@<DOMAIN.COM>"
objEmail.To = "<MAILRECIPIENT>"
objEmail.Subject = "Active Directory Migration Failed"
objEmail.Textbody = "Migration Failed" & Chr(13) & Chr(10) & "Computer Name is: " & sCompID
objEmail.AddAttachment "C:\forensit\migrate.log"
objEmail.Configuration.Fields.Item _
 ("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
objEmail.Configuration.Fields.Item _
 ("http://schemas.microsoft.com/cdo/configuration/smtpserver") = _
"imail2.noridian.com"
objEmail.Configuration.Fields.Item _
 ("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
objEmail.Configuration.Fields.Update
objEmail.Send
 
I then injected this code in the Migrate.vbs in the line right after "MsgBox strMessage, Icon, "User Profile Migration Script"
objWshShell.run "wscript.exe C:\forensit\email.vbs"
 
Now if the Migration fails for someone, I get an email with the log file attached and the PC name. Hope this helps anyone.
 
Rob
Thanks,
Rob
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down



This page was generated in 0.020 seconds.