Information about joeware mixed with wild and crazy opinions...
I was recently asked for a list of MSFT blogs, here you go!
http://blogs.technet.com/blogms/pages/directory-of-microsoft-team-blogs.aspx
joe
This looks very cool…
http://www.cbsnews.com/stories/2010/02/18/60minutes/main6221135.shtml
Could this be sitting in your yard in the next 10 years? If they can truly get it down to a couple thousand I would give it a shot.
…an experiment in designing a solution by feeling the bumps on the walls and listening for screams…
– me (discussing an infrastructure architecture project)
From: joe [mailto:support@joeware.net]
Sent: xxx
To: xxx
Subject: RE: Support Reuest
Hi xxx,
You won’t be able to do this with just usernames in a file with just adfind/admod, you would need a script to add the additional logic to look up the usernames and convert to DNs.
However, if you have a list of user DNs in a file or you can execute a single query to locate the users you can do this with no scripting.
So say you have a list of DNs in the file userlist.txt, you could do something like
adfind homedirectory -adcsv < userlist.txt | admod homedirectory::{{.:r:oldservername:newservername}} -upto maxcount
This takes the DNs from the text file, looks up the current homedirectory value, passes that through the pipe to AdMod which then takes the current value and replaces the oldservername with the newservername and inserts it back into the user object. You specify the -upto switch to specify the maximum number of objects you want to update. By default, admod will bail out and make no changes if more than 10 objects are passed to it, this is to protect people from accidently modifying large numbers of objects by accident. You can modify the safety value with –safety x, this will tell how many items AdMod should be able to modify without bailing out and making no changes. You can use the –upto x switch which will tell it only do the first x updates. Or if you are positive you are good on the specific objects, you can specify –unsafe which tells admod to update anything passed to it.
Example:
Here is the user list
G:\Temp>type userlist.txt
"CN=auser1,OU=XXXTest,DC=test,DC=loc"
"CN=auser2,OU=XXXTest,DC=test,DC=loc"
"CN=auser3,OU=XXXTest,DC=test,DC=loc"
"CN=auser4,OU=XXXTest,DC=test,DC=loc"
Here is the current homedirectory values for that group of users
G:\Temp>adfind homedirectory -adcsv < userlist.txt
~~~ADCSV~~~~~~ADCSV~~~~~~ADCSV~~~~~~ADCSV~~~~~~ADCSV~~~~~~ADCSV~~~~~~ADCSV~~~~~~ADCSV~~~~~~ADCSV~~~~~~ADCSV~~~
"dn","homedirectory"
"CN=auser1,OU=XXXTest,DC=test,DC=loc","\\server1\auser1"
"CN=auser2,OU=XXXTest,DC=test,DC=loc","\\server1\auser2"
"CN=auser3,OU=XXXTest,DC=test,DC=loc","\\server1\auser3"
"CN=auser4,OU=XXXTest,DC=test,DC=loc","\\server1\auser4"
Here is the change
G:\Temp>adfind homedirectory -adcsv < userlist.txt | admod homedirectory::{{.:r:server1:server2}} -unsafe
AdMod V01.12.00cpp Joe Richards (joe@joeware.net) February 2010
DN Count: 4
Using server: TEST-DC1.test.loc:389
Directory: Windows Server 2003
Modifying specified objects…
DN: CN=auser1,OU=XXXTest,DC=test,DC=loc…
DN: CN=auser2,OU=XXXTest,DC=test,DC=loc…
DN: CN=auser3,OU=XXXTest,DC=test,DC=loc…
DN: CN=auser4,OU=XXXTest,DC=test,DC=loc…
The command completed successfully
Here are the new values
G:\Temp>adfind homedirectory -adcsv < userlist.txt
~~~ADCSV~~~~~~ADCSV~~~~~~ADCSV~~~~~~ADCSV~~~~~~ADCSV~~~~~~ADCSV~~~~~~ADCSV~~~~~~ADCSV~~~~~~ADCSV~~~~~~ADCSV~~~
"dn","homedirectory"
"CN=auser1,OU=XXXTest,DC=test,DC=loc","\\server2\auser1"
"CN=auser2,OU=XXXTest,DC=test,DC=loc","\\server2\auser2"
"CN=auser3,OU=XXXTest,DC=test,DC=loc","\\server2\auser3"
"CN=auser4,OU=XXXTest,DC=test,DC=loc","\\server2\auser4"
Hope this helps.
joe
—
O’Reilly Active Directory Fourth Edition – http://www.joeware.net/win/ad4e.htm
From: xxx
Sent: xxx
To: support@joeware.net
Subject: Support Reuest
Dear Joe!
I’d like to congratulate for your site.
There is a big problem, what you could solve for me.
I want to change my fileserver and i want to move user’s fomefolders.
The users are in a USER container(not an OU) in AD.
And they are 260.
How can I change from \\abc\home\user to \\xyz\home\user with your tools?
How can i change it from a file which in contains usernames?
Wich is the best solution export only username from a AD container? And how to use it with admod tools?
Thank You:
xxx
…and I am still using LDAP…
Obviously the announcement of its demise was a bit premature.
That is why I chuckled when I heard it last year. 🙂
joe
I thought this was an interesting little setup…
http://www.motherearthnews.com/Do-It-Yourself/2007-04-01/Portable-Chicken-Mini-coop-Plan.aspx
Yes that is a little different from what I normally post. But hey, I live in the country and am thinking about getting some chickens. 🙂
joe
Do not handicap your children by making their lives easy.
– Robert Heinlein (Time Enough For Love)
Whatever you do, do not let the past be a straitjacket!
Robert Heinlein (The Moon Is a Harsh Mistress)
One way or another, what you get, you pay for.
– Robert Heinlein (The Moon Is a Harsh Mistress)
[joeware – never stop exploring… :) is proudly powered by WordPress.]