Sharepoint question

I am using the built in sharepoint that comes free with Windows server 2008 R2.
I had a user change your name because she got married.  I've made the changes in AD last year, and everything was fine, but the user just asked me why when she logs into sharepoint, it uses her old name.

I tried deleting the user and every time I add the user, even though I use the new format:  domain\username
it still reverts back to the old last name.

I searched through AD, and the old name doesn't exist anywhere.  How do I resolve this issue?  

I'm puzzled.
DanNetwork EngineerAsked:
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.

Walter CurtisSharePoint AEDCommented:
Try this, line by line
Add-PSSnapin Microsoft.SharePoint.Powershell
$web = Get-SPWeb http://webapp
$user = get-spuser -web $web -identity "Incorrect display name exactly as it is shown in SharePoint"
Set-SPuser -identity $user -web $web -DisplayName "New display name to be set by PowerShell"

User names should be in the format Domain\UserName

This is just a band aid for what might be a larger problem, such as UPS not syncing or running.

Hope that helps
DanNetwork EngineerAuthor Commented:
are you saying to run that code on my sharepoint server, right?

I've never worked with powershell, so hopefully that won't brake anything
Just to confirm the format, let me know if this is what I should be entering:

Add-PSSnapin Microsoft.SharePoint.Powershell
$web = Get-SPWeb http://webapp
domain\username = get-spuser -web $web -identity "First name & last name spelled incorrectly"
Set-SPuser -identity domain\user -web $web -DisplayName "First name & last name spelled incorrectly"

where it says http://webapp   do I change this to my own http address of my sharepoint?

also, can this break anything?  I'll do a backup, but I have no idea how to restore it if it breaks sharepoint
Walter CurtisSharePoint AEDCommented:
Yes, your address of you SharePoint goes where is says http://webapp
If you have never worked with PowerShell, you might want to read up on it some however before you start.
Simplify Active Directory Administration

Administration of Active Directory does not have to be hard.  Too often what should be a simple task is made more difficult than it needs to be.The solution?  Hyena from SystemTools Software.  With ease-of-use as well as powerful importing and bulk updating capabilities.

DanNetwork EngineerAuthor Commented:
what is UPS not syncing, so how would I know what the exact problem is, just curious?
DanNetwork EngineerAuthor Commented:
since the snapin was already installed, it didn't install it.

Then it the 2nd line fine with no errors

The third line though came back with an error.  The picture is attached.error
Walter CurtisSharePoint AEDCommented:
Here is an example:
Current Name: Contoso\Jane Doe
New Name: Contoso\Jane Deer
Web App: Team Site

Put it all together like this - run these lines:
add-pssnapin Microsoft.sharepoint.powershell

$web = Get-SPWeb " team site"

$user = Get-SPUser -Web $web -Identity "Contoso\Jane Doe"

Set-SPUser - Identity $user -Web $web -DisplayName "Contoso\Jane Deer"

Run those one at that time. Replace the names and the web address with your information.

Hope that helps

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
DanNetwork EngineerAuthor Commented:
What's really strange is that when I deleted and added the user again,
the name displayed is wrong, but the account is correct.

For example: Let's say:
the user's old name was:  Ana Doe
the user's new name is: Ana Smith

In sharepoint, it shows the name as  Ana Doe\asmith

So the user account is correct, but the name displayed is wrong.  

I checked everywhere in AD and I have no idea where it's getting that information because AD is correct.

Should I still process the commands you suggested as the user account is correct, it's just that the name displayed is wrong.
Walter CurtisSharePoint AEDCommented:
Yes, you are seeing the display name from the user table in the content database. Run the commands.
DanNetwork EngineerAuthor Commented:
THANK YOU SO MUCH!!!!!!!!!!!

it worked!!!!!!!!!!!!!!!!!!!!!
Walter CurtisSharePoint AEDCommented:
You're welcome. Glad I could help you.
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
Windows Server 2012

From novice to tech pro — start learning today.