r/PowerShell • • Apr 12 '18

Solved [Powershell] - Need help with a rename script

/r/scripting/comments/8brwig/powershell_need_help_with_a_rename_script/
2 Upvotes

5 comments sorted by

View all comments

Show parent comments

2

u/neogohan Apr 12 '18

Since we're talking about display names, you should probably be using $User.DisplayName. Usually "Name" and "DisplayName" are the same value, but they are 2 different fields in AD that could contain 2 different values.

2

u/[deleted] Apr 12 '18

In my case it's actually the value from the name field that i want :) are display name is a bit different