List User Account Account Page Properties

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

VBScript Code

On Error Resume Next

Set objUser = GetObject _
WScript.Echo "User Principal Name: " & objUser.userPrincipalName
WScript.Echo "SAM Account Name: " & objUser.sAMAccountName
WScript.Echo "User Workstations: " & objUser.userWorkstations

Set objDomain = GetObject("LDAP://dc=fabrikam,dc=com")
WScript.Echo "Domain controller: " & objDomain.dc