Displays all the telephone attribute values for the MyerKen Active Directory user account.
On Error Resume NextSet objUser = GetObject _("LDAP://cn=MyerKen,ou=Management,dc=NA,dc=fabrikam,dc=com")strHomePhone = objUser.Get("homePhone")strPager = objUser.Get("pager")strMobile = objUser.Get("mobile")strIpPhone = objUser.Get("ipPhone")strInfo = objUser.Get("info")strFacsimileTelephoneNumber = objUser.Get("facsimileTelephoneNumber")arrOtherHomePhone = objUser.GetEx("otherHomePhone")arrOtherPager = objUser.GetEx("otherPager")arrOtherMobile = objUser.GetEx("otherMobile")arrOtherIpPhone = objUser.GetEx("otherIpPhone")arrOtherFacsimileTelephoneNumber = _objUser.GetEx("otherFacsimileTelephoneNumber")WScript.Echo "homePhone: " & strHomePhoneWScript.Echo "pager: " & strPagerWScript.Echo "mobile: " & strMobileWScript.Echo "ipPhone: " & strIpPhoneWScript.Echo "info: " & strInfoWScript.Echo "facsimileTelephoneNumber: " & strFacsimileTelephoneNumberWScript.Echo "otherHomePhone:"For Each strValue in arrOtherHomePhoneWScript.Echo strValueNextWScript.Echo "otherPager:"For Each strValue in arrOtherPagerWScript.Echo strValueNextWScript.Echo "otherMobile:"For Each strValue in arrOtherMobileWScript.Echo strValueNextWScript.Echo "otherIpPhone:"For Each strValue in arrOtherIpPhoneWScript.Echo strValueNextWScript.Echo "otherFacsimileTelephoneNumber:"For Each strValue in arrOtherFacsimileTelephoneNumberWScript.Echo strValueNext
This is a VB Script, this can be used by saving the file in .vbs file