Experts Exchange connects you with the people and services you need so you can get back to work.
There are many ways to learn to code these days. From coding bootcamps like Flatiron School to online courses to totally free beginner resources. The best way to learn to code depends on many factors, but the most important one is you. See what course is best for you.
Set objExcel = CreateObject("Excel.Application")
objExcel.Visible = True
intRow = 2
objExcel.Cells(1, 1).Value = "User Name"
objExcel.Cells(1, 2).Value = "Full Name"
objExcel.Cells(1, 3).Value = "Description"
strDomain = InputBox ("Enter Domain Name")
Set DomObj = GetObject("WinNT://" & strDomain )
DomObj.Filter = Array("User")
For Each objUser In DomObj
objExcel.Cells(intRow, 1).Value = objUser.Name
objExcel.Cells(intRow, 2).Value = objUser.FullName
objExcel.Cells(intRow, 3).Value = objUser.Description
intRow = intRow + 1
objExcel.Selection.Interior.ColorIndex = 19
objExcel.Selection.Font.ColorIndex = 11
objExcel.Selection.Font.Bold = True
Open in new window
Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.
Have a better answer? Share it in a comment.
Please enter a first name
Please enter a last name
Must be at least 4 characters long.
Join and Comment
Watch this video to see how easy it is to make mass changes to Active Directory from an external text file without using complicated scripts.