Can you help me migrate users from a standalone Windows 2003 server to a new Active Directory list?

0 pts.
Tags:
Active Directory
Windows
Windows client administration and maintenance
Windows Server 2003
I need your help please. Currently we have one standalone server (Windows 2003) without Active Directory. We have around 1,000 users in there. Now we want to migrate these users into a new Windows 2003 server Active Directory list. Is there a way for me to simply save from the standalone server and transfer that to the new Active Directory server. I just need the users -- that's all. I'm not worried about the passwords. Thanks alot!
ASKED: May 21, 2008  2:54 PM
UPDATED: May 21, 2008  5:56 PM

Answer Wiki

Thanks. We'll let you know when a new response is added.

Hello WinComputingATE,
hereafter a couple of tips that may help you in getting this things done.

1st script creates a file called MyUsers.txt containing the local usernames.
<pre>
set objFSO=CreateObject(“Scripting.FileSystemObject”)
set objFile=objFSO.CreateTextFile(“MyUsers.txt”,TRUE)
Set objNetwork = CreateObject(“Wscript.Network”)
strComputer = objNetwork.ComputerName
Set colAccounts = GetObject(“WinNT://” & strComputer & “”)
colAccounts.Filter = Array(“user”)
For Each objUser In colAccounts
objFile.WriteLine objUser.Name
Next
objFile.Close
MsgBox(“Finished exporting users”,vbOKOnly+vbInformation,”Exported Users”)
</pre>

2nd script: Reads data from the text file and adds them to the domain.
<pre>
Const ForReading=1
Const strPass = “initialpassword”
Set objRoot = GetObject(“LDAP://RootDSE”)
strDomainPath = objRoot.Get(“DefaultNamingContext”)
strContainer=”CN=MyUsers”

strFile=”MyUsers.txt”
set objFSO=CreateObject(“Scripting.FileSystemObject”)
set objFile=objFSO.OpenTextFile(strFile,ForReading)
do While objFile.AtEndOfStream<>True
strEntry = objFile.ReadLine
CreateUser strEntry
loop
objFile.Close

Sub CreateUser(strUser)
set objContainer=GetObject(“LDAP://” & strContainer & “,” & strDomainPath)
set objUser=objContainer.Create (“User”,”cn=” & strUser)
objuser.Put “samAccountName”,strUser
objUser.SetInfo
objUser.SetPassword(strPass)
objUser.Put “PasswordExpired”, 1
objUser.SetInfo
End Sub
</pre>

I hope this helps.

P.S. I suggest you to first create a test environment where you can try this before going <i>live</i> with this solution.
To build the test-lab you can use the <a href=”http://register.vmware.com/content/eula-a.html”>VMWare Server</a> and <a href=”http://www.vmware.com/download/converter/”>VMWare Converter</a>.
With the converter you can create a virtual machine that is the exact copy of your running server, then you mount this virtual machine in VMWare Server and perform your tests.

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following