So, for quite a number of years, I have been dealing with an odd problem.
I am in a situation where users are assigned windows logins which include their initials and department numbers.
For a new user, the data flows from Active Directory through the timer jobs that import AD into SharePoint.
Then, as they use a site collection, a copy of some of their data goes into the SharePoint site collection user list.
This is, of course, a vastly simplied explanation of the standard way things work.
Now, on a regular basis a user moves from one department to another, or in some cases, a user changes some portion of their name.
This results in them having a new login.
In most cases, this information makes its way through the process and the user list is mostly updated...
Right now, 8 fields in the user information record are populated. 7 of the fields are updated ... but not the Account field.
This leaves the user entry half pointing to the user's new login and half pointing to a login that no longer exists.
This results in problems in various ways - sometimes the user can check items out but not back into a library. Sometimes an ASPX page can determine the user's name, but not their login, and so forth.
Is there a way, via PowerShell, that I could run through every web application, every site collection in a farm, checking the users in the user list and generate a report on the user entries which have the account value different from the user name ?
I am not looking to automatically fix anything right now - just wanting to generate a report on users which have the issue.
Thank you so much.