export local users and passwords

Hi Experts,

I have a server WIN2008 in a workgroup.
Here I have many local users.
How to export the users with password ?

And later I have to import the users on a WIN2012 server.
Eprs_AdminSystem ArchitectAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

you can use ths powershell line to list the users, but you cannot get the passwords out!

# List all local users on the local or a remote computer
$computerName = Read-Host 'Enter computer name or press <Enter> for localhost'
if ($computerName -eq "") {$computerName = "$env:computername"}
$computer = [ADSI]"WinNT://$computerName,computer"
$computer.psbase.Children | Where-Object { $_.psbase.schemaclassname -eq 'user' } | Format-Table Name, Description -autoSize

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
to import,  if you created a csv from the export, you can use this:

Import-Csv .\userlist.csv |foreach { .\add-localuser.ps1 -usr $_.user -FullName $_.FullName -cust $_.customer -ip $_.ip}
Mal OsborneAlpha GeekCommented:
By default, Windows server uses a non-reversible encryption algorithm to store a password hash. Passwords are run through some mathematics, to spit out some random looking garbage. When a user  attempts to log on, the password they type in is run through the same algorithm, and if correct, should produce matching garbage.  It is not possible to work out the original password from the garbage, in fact multiple passwords will produce the same password hash.

I have simplified this a bit, however it remains impossible to retrieve passwords, as only a hash is stored.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.