SnAkEhIpS
asked on
Find all users in domain with home directory on the same server -VBScript-
Trying to find all users in Active Directory who have their home directory mapped to a particular server . For example:
I want to know all users who have their home directory mapped to ServerXYZ. All user home directory paths in the domain take the exact same form: \\Server\Users\UserName\Ho me
I want to know all users who have their home directory mapped to ServerXYZ. All user home directory paths in the domain take the exact same form: \\Server\Users\UserName\Ho
ASKER
I tried the dn of the OU and "", but nothing was written to the outputfile. It was created, but empty - 0KB.
Hmmm, it works for me. If you set strOU = "" it will scan the entire domain for any user home directory that *starts with* whatever you put for strHomeDirectoryBase
You could try it as just the server name to see if it outputs better.
strHomeDirectoryBase = "\\YOURFILESERVER\"
Regards,
Rob.
You could try it as just the server name to see if it outputs better.
strHomeDirectoryBase = "\\YOURFILESERVER\"
Regards,
Rob.
ASKER
Still nothing. I can run other scripts against AD. If I couldn't connect, then I should see some error message shouldn't I?
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER
strBase = "<LDAP://" & strOU & strDNSDomain & ">"
That did it :-) Thank you very much.
That did it :-) Thank you very much.
Good to hear. Thanks for the grade.
Rob.
Rob.
Regards,
Rob.
Open in new window