Quantcast
Channel: THWACK: Popular Discussions - Script Lab
Viewing all articles
Browse latest Browse all 9937

Correct Order of Script to search specific OU(s) for locked out users and not just entire Domain

$
0
0

Seems script for ADLockout only works if I have one line of string:  It will work for onlty the last line of this "ou=IT people,ou=users,ou=site" I want it to look thru all the strings of OU's.  Do I need to remove the quotes at end of each line? please help?  I am not a coder. I copy and try to use what others have graciously allowed to use.  I am trying to only alert specific admins of their specific site ou's only and not everyone to see all ad lockouts.

 

Set adoCommand.ActiveConnection = adoConnection

' Search entire domain. Use server binding.
strPrefix = "ou=Cumberland,ou=CaL,ou=Employees,ou=Users,ou=Site, "
strPrefix = "ou=Pittsburgh,ou=CAL,ou=Employees,ou=Users,ou=Site, "
strPrefix = "ou=Denver,ou=CAL,ou=Employees,ou=Users,ou=Site, "
strPrefix = "ou=IT Staff,ou=Users,ou=Site, "

strBase = "<LDAP://" & strServer & "/" & strPrefix & strDNSDomain & ">"

 

thank you


Viewing all articles
Browse latest Browse all 9937

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>