Solved

Export from Server 2008 to import to Server 2008

Posted on 2012-03-22
9
444 Views
Last Modified: 2012-04-12
Hi all,


Server 2008 R2 with around 75user accounts.


I have a new Server 2008 R2 server and I wish to import the user names only. Not worried about keeping the passwords. Just first name, surname and username

Can some one advise of the best way to do this?
0
Comment
Question by:unrealone1
9 Comments
 
LVL 37

Expert Comment

by:Neil Russell
ID: 37753568
Are you talking about active directory?
Is this to a NEW Active Directory domain?
0
 
LVL 1

Author Comment

by:unrealone1
ID: 37753579
Yes from AD on a Server 2008 R2 server to AD on another 2008 R2 server.

domain MyCompany.Local is the same.
0
 
LVL 37

Expert Comment

by:Neil Russell
ID: 37753581
If your on about LOCAL accounts then see here, is simple :D

Local User and Group Migration Guide
http://technet.microsoft.com/en-us/library/dd379531(v=ws.10).aspx
0
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

 
LVL 37

Assisted Solution

by:Neil Russell
Neil Russell earned 167 total points
ID: 37753588
If it is the SAME domain then you dont have to do anything.

You create your new server, join it to the domain and then DCPROMO it to a DC. It will replicate all users between and you will have 2 AD servers,
0
 
LVL 1

Author Comment

by:unrealone1
ID: 37753605
This new server is being built offsite. It won't be touching the old server. All I want to do is export the user accounts to a csv, so I can then import them.
0
 
LVL 16

Assisted Solution

by:R. Andrew Koffron
R. Andrew Koffron earned 167 total points
ID: 37753748
to export a csv file just open the users and computers, choose the OU with your users in in and go to the view menu>add/remove columns create the veiw you want and export to a text file.  than you just need to import to excel and change the tab delimited to comma delimitated  .
0
 
LVL 39

Accepted Solution

by:
Adam Brown earned 166 total points
ID: 37753753
Powershell's the easy way. Using the 2008 R2 Active Directory Module for Powershell:

On the first server:
get-aduser -filter *| select samaccountname,givenname,surname | export-csv <filename>

On the second server:
$users = import-csv <filename>
foreach ($user in $users)
{new-aduser -samaccountname $user.samaccountname -givenname $user.givenname -surname $user.surname -accountpassword (ConvertTo-SecureString -AsPlainText "<password you want>" -Force)}
0
 
LVL 1

Author Comment

by:unrealone1
ID: 37757014
Ran the first command to export. This appeared to work ok.


On the new server using the Powershell Active Directory.

I run this command:

$users = import-csv thefileiexported
foreach ($user in $users)
{new-aduser -samaccountname $user.samaccountname -givenname $user.givenname -surname $user.surname -accountpassword (ConvertTo-SecureString -AsPlainText "mypa55word" -Force)}

and then I get

>> 

(I press enter)

Then I get

cmdlet New-AdUser at command pipelane position 1



Please advise?
0
 

Expert Comment

by:JerseyGiant
ID: 37838896
did you ever get an answer?
0

Featured Post

Does Powershell have you tied up in knots?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Scenario:  You do full backups to a internal hard drive in either product (SBS or Server 2008).  All goes well for a very long time.  One day, backups begin to fail with a message that the disk is full.  Your disk contains many, many more backups th…
I was supporting a handful of Windows 2008 (non-R2) 2 node clusters with shared quorum disks. Some had SQL 2008 installed and some were just a vendor application that we supported. For the purposes of this article it doesn’t really matter which so w…
This tutorial will show how to push an installation of Backup Exec to an additional server in both 2012 and 2014 versions of the software. Click on the Backup Exec button in the upper left corner. From here, select Installation and Licensing, then I…
This tutorial will walk an individual through the steps necessary to install and configure the Windows Server Backup Utility. Directly connect an external storage device such as a USB drive, or CD\DVD burner: If the device is a USB drive, ensure i…

808 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question