Retrieves user account attributes found on the Profile page of the user account object in Active Directory users and Computers.
On Error Resume NextSet objUser = GetObject _("LDAP://cn=myerken,ou=management,dc=fabrikam,dc=com")objUser.GetInfostrProfilePath = objUser.Get("profilePath")strScriptPath = objUser.Get("scriptPath")strHomeDirectory = objUser.Get("homeDirectory")strHomeDrive = objUser.Get("homeDrive")WScript.echo "profilePath: " & strProfilePathWScript.echo "scriptPath: " & strScriptPathWScript.echo "homeDirectory: " & strHomeDirectoryWScript.echo "homeDrive: " & strHomeDrive
This is a VB Script, this can be used by saving the file in .vbs file