List Organization Information for a User Account

Retrieves user account attributes found on the Organization page of the user account object in Active Directory Users and Computers.

VBScript Code

On Error Resume Next

Set objUser = GetObject _

WScript.Echo "Title: " & objUser.title
WScript.Echo "Department: " & objUser.department
WScript.Echo "Company: " &
WScript.Echo "Manager: " & objUser.manager
For Each strValue in objUser.directReports
    WScript.Echo "Direct Reports: " & strValue