Posts
245
Trackbacks
0
February 2012 Entries
Going from “domain\username” to Display name in SharePoint

While at a client location this week I ran into the situation of their SharePoint deployment recognizing a handful of people by their Display Name and others (a lot more) by their “domain\username” account.

And since they had User Profile in place they felt something was just not right, and if you combine that and the fact most of the information available around that issue tells you it is a profile issue, you can understand the frustration of going back to the sync process and correcting in AD, trying this and that and nothing would fix it.

How else to fix it?  Over time I have come to just rely on man’s best friend, I should say “SharePoint’s best friend, PowerShell will always have “a fix for that”.  If we look at what is available, there is Get-SPUser and Set-SPUser.

What does Get-SPUser give me?

(more info on Get-SPUser)

The main thing I was after was to review the info on the user information store (details from AD) passed on to SharePoint.  And there it was, it gave me back the username and the Display Name.  The command used:

Get-SPUser –Web http://<name of web app>

Time to try what options Set-SPUser would allow me to use.

(More info on Set-SPUser)

As the premise for PowerShell goes, we are now used to seeing the type of commands, like Get which will help us retrieve information.  Then we have Set, which will help us modify/change values.

The command to do a one user sync would like this:

Set-SPUser –Identity ‘<domain>\<username> –SyncFromAD –Web http://<name of web app>

And we are set …

What is it you say?  What if this is to be done for every user?

Keep in mind PowerShell has an iterative nature.

Therefore, what if we combined both commands above to retrieve the user and then pass it on to the next command to synchronize from AD.

Here it is:

Get-SPUser –Web http://<name of web app> | Set-SPUser –SyncFromAD

Ok, that is it for now, give it a go and enjoy Display names with your SharePoint deployment.

Posted On Monday, February 27, 2012 9:03 AM | Comments (2)
Back in the Saddle

It seems 2012 has started with an even faster pace than 2011 did.  And with that the activities for a year full of promise have started.

So far this year I am scheduled to be at the following events in Q1.

Inaugural Office 365 Saturday in Redmond: February 25th, 2012.

codepaLOUsa, Louisville, KY: March 15-17, 2012.

There have been changes and more changes going on, but will be back to post and go through a memory dump of the challenges I have encountered, but more importantly, the solutions that have come from that.

Posted On Tuesday, February 7, 2012 2:37 PM | Comments (0)
Disclaimer: The views expressed on this blog are my own and do not necessarily reflect the views of my employer.

Creative Commons License


Check out my about.me profile!

INETA Community Speakers Program

Follow enriquelima on Twitter
Locations of visitors to this page