Forum Search:
Forum.Brain-Cluster.com: Brain Cluster Technical Forum
Ultimate forum for Technical Discussions

Home » Microsoft » Windows Server » Active Directory » Display Name overwritten by SAM account name - script required to
Display Name overwritten by SAM account name - script required to [message #293176] Wed, 21 October 2009 10:43 Go to next message
Stuscotland  is currently offline Stuscotland
Messages: 8
Registered: October 2009
Junior Member
We're in the middle of a migration using Quest Migration Manager. We have an
issue where 500 users have had their Display Name changed to their sam
account name in the target domain. We do not have a clue as to how this
happened, but we need to fix it fast while we wait on Quest support.

Does anyone know of a script that will change the Display Name field back to
Firstname Lastname? Currently the GAL is a mess where users are now
1234ab_cd etc (source domain userlogon name format)

Thanks in advance.
Re: Display Name overwritten by SAM account name - script required to [message #293183 is a reply to message #293176] Wed, 21 October 2009 10:52 Go to previous messageGo to next message
pbbergs  is currently offline pbbergs  United States
Messages: 1024
Registered: July 2009
Senior Member
powershell, vbscript, etc... There is no utility that is going to this for
you.

http://technet.microsoft.com/en-us/scriptcenter/dd742419.asp x

http://gallery.technet.microsoft.com/ScriptCenter/en-us/site /search?f%5B0%5D.Type=RootCategory&f%5B0%5D.Value=active directory&f%5B0%5D.Text=Active%20Directory&f%5B1%5D. Type=SubCategory&f%5B1%5D.Value=useraccounts&f%5B1%5 D.Text=User%20Accounts


--
Paul Bergson
MVP - Directory Services
MCTS, MCT, MCSE, MCSA, Security+, BS CSci
2008, 2003, 2000 (Early Achiever), NT4
Microsoft's Thrive IT Pro of the Month - June 2009

http://www.pbbergs.com

Please no e-mails, any questions should be posted in the NewsGroup This
posting is provided "AS IS" with no warranties, and confers no rights.

"Stuscotland" <Stuscotland@discussions.microsoft.com> wrote in message
news:1C0A3F0D-CD49-4EC0-B9E2-88F85EDD5188@microsoft.com...
> We're in the middle of a migration using Quest Migration Manager. We have
> an
> issue where 500 users have had their Display Name changed to their sam
> account name in the target domain. We do not have a clue as to how this
> happened, but we need to fix it fast while we wait on Quest support.
>
> Does anyone know of a script that will change the Display Name field back
> to
> Firstname Lastname? Currently the GAL is a mess where users are now
> 1234ab_cd etc (source domain userlogon name format)
>
> Thanks in advance.
Re: Display Name overwritten by SAM account name - script required to [message #293184 is a reply to message #293176] Wed, 21 October 2009 10:54 Go to previous messageGo to next message
florian  is currently offline florian  Germany
Messages: 484
Registered: July 2009
Senior Member
Howdie!

Stuscotland schrieb:
> We're in the middle of a migration using Quest Migration Manager. We have an
> issue where 500 users have had their Display Name changed to their sam
> account name in the target domain. We do not have a clue as to how this
> happened, but we need to fix it fast while we wait on Quest support.
>
> Does anyone know of a script that will change the Display Name field back to
> Firstname Lastname? Currently the GAL is a mess where users are now
> 1234ab_cd etc (source domain userlogon name format)

You should be good with any kind of script that is able to fetch first
and lastname (attributes: givenName and sn) and put them back in place
in the displayName attribute.

I can imagine this should be easy with a combination of ADFind/ADMod as like

adfind -adcsv -b "OU=userOU,DC=yourDomain,DC=tld" -f
"(&(objectClass=user)(objectCategory=person))" givenName sn | admod
givenName::{{givenName}} {{sn}}

You would probably wanna test that in a test OU with some sample users.

Cheers,
Florian
--
Microsoft MVP - Group Policy
eMail: prename [at] frickelsoft [dot] net.
blog: http://www.frickelsoft.net/blog.
Maillist (german): http://frickelsoft.net/cms/index.php?page=mailingliste
Re: Display Name overwritten by SAM account name - script required [message #293323 is a reply to message #293184] Wed, 21 October 2009 12:31 Go to previous messageGo to next message
Stuscotland  is currently offline Stuscotland
Messages: 8
Registered: October 2009
Junior Member
Thanks all. However my scripting is a little rusty. I have a CSV extracted
from Exchange 2007 of all those in error which need their Display Names
changed - is there a way to use this CSV to make the changes?

ST


"Florian Frommherz [MVP]" wrote:

> Howdie!
>
> Stuscotland schrieb:
> > We're in the middle of a migration using Quest Migration Manager. We have an
> > issue where 500 users have had their Display Name changed to their sam
> > account name in the target domain. We do not have a clue as to how this
> > happened, but we need to fix it fast while we wait on Quest support.
> >
> > Does anyone know of a script that will change the Display Name field back to
> > Firstname Lastname? Currently the GAL is a mess where users are now
> > 1234ab_cd etc (source domain userlogon name format)
>
> You should be good with any kind of script that is able to fetch first
> and lastname (attributes: givenName and sn) and put them back in place
> in the displayName attribute.
>
> I can imagine this should be easy with a combination of ADFind/ADMod as like
>
> adfind -adcsv -b "OU=userOU,DC=yourDomain,DC=tld" -f
> "(&(objectClass=user)(objectCategory=person))" givenName sn | admod
> givenName::{{givenName}} {{sn}}
>
> You would probably wanna test that in a test OU with some sample users.
>
> Cheers,
> Florian
> --
> Microsoft MVP - Group Policy
> eMail: prename [at] frickelsoft [dot] net.
> blog: http://www.frickelsoft.net/blog.
> Maillist (german): http://frickelsoft.net/cms/index.php?page=mailingliste
> .
>
Re: Display Name overwritten by SAM account name - script required [message #293435 is a reply to message #293323] Wed, 21 October 2009 14:14 Go to previous message
Stuscotland  is currently offline Stuscotland
Messages: 8
Registered: October 2009
Junior Member
FIXED

Our solution was to use good old ADModify 2.1 - I don't know why I didn't
think of it before.

Thanks all.

"Stuscotland" wrote:

> Thanks all. However my scripting is a little rusty. I have a CSV extracted
> from Exchange 2007 of all those in error which need their Display Names
> changed - is there a way to use this CSV to make the changes?
>
> ST
>
>
> "Florian Frommherz [MVP]" wrote:
>
> > Howdie!
> >
> > Stuscotland schrieb:
> > > We're in the middle of a migration using Quest Migration Manager. We have an
> > > issue where 500 users have had their Display Name changed to their sam
> > > account name in the target domain. We do not have a clue as to how this
> > > happened, but we need to fix it fast while we wait on Quest support.
> > >
> > > Does anyone know of a script that will change the Display Name field back to
> > > Firstname Lastname? Currently the GAL is a mess where users are now
> > > 1234ab_cd etc (source domain userlogon name format)
> >
> > You should be good with any kind of script that is able to fetch first
> > and lastname (attributes: givenName and sn) and put them back in place
> > in the displayName attribute.
> >
> > I can imagine this should be easy with a combination of ADFind/ADMod as like
> >
> > adfind -adcsv -b "OU=userOU,DC=yourDomain,DC=tld" -f
> > "(&(objectClass=user)(objectCategory=person))" givenName sn | admod
> > givenName::{{givenName}} {{sn}}
> >
> > You would probably wanna test that in a test OU with some sample users.
> >
> > Cheers,
> > Florian
> > --
> > Microsoft MVP - Group Policy
> > eMail: prename [at] frickelsoft [dot] net.
> > blog: http://www.frickelsoft.net/blog.
> > Maillist (german): http://frickelsoft.net/cms/index.php?page=mailingliste
> > .
> >
Previous Topic:W2K3R2 32bit and W2K3R2 64bit domain controllers on same domain?
Next Topic:Server Roles
Goto Forum:
  


Current Time: Tue Jan 16 10:39:55 MST 2018

Total time taken to generate the page: 0.04184 seconds
.:: Contact :: Home ::Sitemap::.

Powered by: FUDforum 3.0.0RC2.
Copyright ©2001-2009 FUDforum Bulletin Board Software