On Tue, Apr 28, 2015 at 7:31 PM, Freddy Grande
<[email protected]> wrote:
> I don't think it's a good idea to ever assume everything is correct and
> applies to a given policy.
>
> In your scenario you're probably better off enumerating the list of home
> folders then matching them to the homeDirectory user attribute and once you
> have your user, grabbing the sAMAccountName or whatever attribute you need
> to work with. This should work for any user unless their homeDirectory
> attribute is wrong and isn’t working to begin with.

That's exactly what I am doing. :-) What was time consuming was
accounting for home folders that didn't conform to (current) naming
standards, and determining whether it was still, in fact, a valid user
home folder or not.

> We have similar problems as back in the day the usernames were three letters
> standing for first, middle and last names, later we moved to
> firstname.lastname. We haven’t migrated any users to the new system and
> their home drives reflect that. On top of that we have the occasional rename
> when female employees lose their maiden name or employees go by a less
> formal name (such as David being renamed to Dave) so we have quite a few
> non-matching home directories with usernames.

Yeah, I have that problem, too.


================================================
Did you know you can also post and find answers on PowerShell in the forums?
http://www.myitforum.com/forums/default.asp?catApp=1

Reply via email to