Create list of AD user and write to file

Here is a simple script that check AD for user and writes to a log file.

You need to change two variables,

Ldapsvr_str, Put in the domain and OU that you want user from
output_str, Destination file name.

copy All text between ******** and save to a vbs file, EG ADuser.VBS

************************************************

‘ gets list of user form server.

Const ADS_SCOPE_SUBTREE = 2
dim lDapSvr_str ‘server and OU name
Dim Output_str –

Practical IT tips, straight to your inbox

Microsoft 365 updates, security alerts and plain-English tech advice for small businesses, emailed when we publish a new article.

We don’t spam! Read our privacy policy for more info.

Leave a Reply