I'm working on generating user IDs based on email addresses with PowerShell, but I've hit a snag. Some users have up to four different accounts that all share the same email address. Is there a way to figure out which account they primarily use to log in at their workstation and conduct daily activities?
1 Answer
You could check the login timestamps for each account, but you'd need access to all the domain controllers to gather that data. Also, some organizations have specific groups or rules that assign different accounts based on usage—for example, admin accounts versus regular user accounts. Having an OU structure might help keep this organized better too.
I'm sure there’s a simpler way to figure this out, but I can only work with what I’ve got. Thanks for the advice!