header
header Register : : Login header
header
divider
menuleft
menuright
submenu
left

[August 25th, 2008] Check the home page regarding PowerShell related news from a brand new sponsor: Idera

Move AD Account from old linux based domain to new MS ADS Server
Last Post 18 Jul 2008 07:50 PM by ssaehrig. 9 Replies.
Printer Friendly
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
ssaehrigUser is Offline
New Member
New Member
Posts:31

--
16 Jul 2008 12:39 AM  

I have been tasked with migrating 100 users from a open LDAP domain to a new MS ADS server. the problem is i need to migrate the Passwords and all setting in AD along with when the user logs into thier pc it should not trigger a new profile on desktop. I know i can export all the info with get-qadobject to CSV. But how do i import all that info into a new domain.

 

Thank you for any suggestions.

halr9000User is Offline
Basic Member
Basic Member
Posts:316

--
16 Jul 2008 01:39 AM  
Don't forget that for most every get-q* cmdlet there's a set and a new. That may not be your best option though. I'd wait to see what kind of magic that BSonPosh suggests. AD seems to be his specialty. :)
bsonposhUser is Offline
Basic Member
Basic Member
Posts:388

--
16 Jul 2008 02:39 AM  
My question here would be how do you get the password. Generally speaking Passwords you shouldn't never be able to extract the passwords from the database. Perhaps in your case you can, but I would be curious about that.

As for the profiles, you could probably tweak the registry and make this work, but I would expect a lot of troubles with this.

Outside of those... it is pretty simple.

as a side note... you could try ADMTv3... support wise it shouldnt work, but I can't think of a technical reason why it wouldnt.
bsonposhUser is Offline
Basic Member
Basic Member
Posts:388

--
16 Jul 2008 02:40 AM  
wow... got to love the double negative " shouldn't never " that will teach me to write on the bus.

You should NOT be able to extract the password.
ssaehrigUser is Offline
New Member
New Member
Posts:31

--
16 Jul 2008 01:12 PM  
I agree with your concerns for the passwords. But the customer is a small business and would like if at all possible to retain there passwords without end user input. If it cant happen its OK just preferred. I am unsure of the syntax for using quest to import fields from a CSV any suggestions there?
Also i did look into admt v3 but as you said they dont list it as supported. I will build a lab to try admt v3.

Steven Saehrig
bsonposhUser is Offline
Basic Member
Basic Member
Posts:388

--
16 Jul 2008 01:28 PM  
I wouldnt rule out the passwords just yet, but I would set the expectations that is probably not going to happen. You should explain why it can't happen (although the customer probably wont get what your saying they will feel more secure in your knowledge.)

So... back to your question. You could use import-csv and foreach(){} to create the users for you. The CSV file needs headers.

I think in your case the best option would be to dynamically create the hash table that contains all the properties, but I would have to test this... im thinking something like this. THIS IS NOT WORKING CODE! Just a suggestion on direction.

foreach($user in $users)
{
   $props = $user | Get-Member -MemberType properties | %{$_.name}
   foreach($prop in $props)
   {
      $myprops.$prop = $user.$prop
   }
   new-qaduser ... -objectattributes $myprops
}
ssaehrigUser is Offline
New Member
New Member
Posts:31

--
16 Jul 2008 03:00 PM  
thank you for the direction. do you think an export of all object will give me the information i need to build that hash table. the most i have done with creating new users
bsonposhUser is Offline
Basic Member
Basic Member
Posts:388

--
16 Jul 2008 03:11 PM  
It should have all the information you need... my concern with that is making sure there are no schema extensions on the openLDAP side (extra properties that are used, but AD will not have.)
bsonposhUser is Offline
Basic Member
Basic Member
Posts:388

--
16 Jul 2008 03:27 PM  
Ok... here is what I think will work, assuming that all the properties in your CSV are valid AD properties. ( IMO you should be very picky what you pull from the OpenLDAP server.)

$users = import-csv YouCSVFile.Csv
foreach($user in $users)
{
   $props = @{}
   $propNames = $user | Get-Member -MemberType properties | %{$_.name}
   foreach($prop in $propNames)
   {
      $props += @{$prop=$user.$prop}
   }
   new-qaduser -name $user.name -objectattributes $props -whatif
}

ssaehrigUser is Offline
New Member
New Member
Posts:31

--
18 Jul 2008 07:50 PM  

Thank you.  i will let you know how it works out.

You are not authorized to post a reply.

Active Forums 4.1
right
   
footer Sponsored by Quest Software • SAPIEN Technologies • ShellTools, LLC • Microsoft Windows Server 2008 footer
footer