Powershell script to auto-generate address book from Active Directory query.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • SCR512
    • Jun 2025

    #1

    Powershell script to auto-generate address book from Active Directory query.

    This Powershell script will essentially rip through Active Directory looking for Users with a defined manager and telephone value and create an address book .CSV that can be readily imported into your Ricoh copier.

    This script is dependent on Active Roles Managment Shell for Active Directory PowerShell Commands (CMDLETs) for Active Directory by Quest Software This is required to query Active Directory and generate a list of users.

    I also assume you know how to use Powershell, ie: I expect you know how to sign scripts or set the local execution policy properly to run this script.

    This seems to work in my environment. I have a mixture of Richo Aficio MP C2550 and MP C4000s.

    Note: The only bit I've yet to figure out is getting sorting working on the copier, so imported results will be grouped properly but the names are not sorted properly within the groups.

    Example of output:
    Code:
    #Registration Data
    #Format Version:3.1.5.0
    #Export Date: 10/25/2011 2:27 PM
    #Device Name:Your_Printer
    #Address:127.0.0.1
    #Registration No.,Type,Name,Key Display,Index,Freq.,Title 1,Title 2,Title 3,E-mail Address,Use Name as,Protect Sender,Password,User Code/Device Login User Name,Groups User Belongs to,Fax Destination,Line Type,International Transmission Mode,Fax Header,Label Insertion 1st Line (Selection),Label Insertion 2nd Line (String),Label Insertion 3rd Line (Standard Message),Protect Folder,Password Encoding,Protocol,Port No.,Server Name,Path,User Name,Japanese Character Code,Access Privilege to User,Access Privilege to Protected Files,IP-Fax Protocol,IP-Fax Destination,Login Password for Device,Password Method,SMTP Authentication,SMTP Authentication: Login User Name,SMTP Authentication: Login Password,Password Method,Folder Authentication,Folder Authentication: Login Password,Password Method,LDAP Authentication,LDAP Authentication: Login User Name,LDAP Authentication: Login Password,Password Method,Direct SMTP
    <index>,<type>,<name>,<displayName>,<phoneticName>,<common>,<tagSet1>,<tagSet2>,<tagSet3>,<address>,<isSender>,<protect>,<password>,<userCode>,<group>,<faxNumber>,<lineType>,<isAbroad>,<ttiNo>,<label1>,<label2String>,<messageNo>,<protectFolder>,<passwordEncoding>,<folderProtocol>,<ftpPort>,<folderServer>,<folderPath>,<folderUser>,<ftpCharCoding>,<entryACL>,<documentACL>,<IPfaxProtocol>,<IPfaxAddress>,<authPassword>,<passwordEncoding2>,<SMTPAuth>,<SMTPUser>,<SMTPPassword>,<passwordEncoding3>,<folderAuth>,<folderPassword>,<passwordEncoding4>,<LDAPAuth>,<LDAPUser>,<LDAPPassword>,<passwordEncoding5>,<DirectSMTP>
    [00001],[A],[Aaron C.],[Aaron C.],,[0],[1],[0],[0],[],[0],[0],[],[],[],[],[0],[0],[0],[0],[],[0],[0],[],[0],[],[],[\\contoso_fs\home_directories\aclancy],[],[],,,,,,,[0],[],[],[omitted],[0],[],[omitted],[0],[],[],[omitted],[]
    [00002],[A],[Adam P.],[Adam P.],,[0],[1],[0],[0],[],[0],[0],[],[],[],[],[0],[0],[0],[0],[],[0],[0],[],[0],[],[],[\\contoso_fs\home_directories\apalter],[],[],,,,,,,[0],[],[],[omitted],[0],[],[omitted],[0],[],[],[omitted],[]
    [00003],[A],[Aelly L.],[Aelly L.],,[0],[1],[0],[0],[],[0],[0],[],[],[],[],[0],[0],[0],[0],[],[0],[0],[],[0],[],[],[\\contoso_fs\home_directories\aliu],[],[],,,,,,,[0],[],[],[omitted],[0],[],[omitted],[0],[],[],[omitted],[]
    [00004],[A],[AJ R.],[AJ R.],,[0],[1],[0],[0],[],[0],[0],[],[],[],[],[0],[0],[0],[0],[],[0],[0],[],[0],[],[],[\\contoso_fs\home_directories\arauen],[],[],,,,,,,[0],[],[],[omitted],[0],[],[omitted],[0],[],[],[omitted],[]
    [00005],[A],[Alex S.],[Alex S.],,[0],[1],[0],[0],[],[0],[0],[],[],[],[],[0],[0],[0],[0],[],[0],[0],[],[0],[],[],[\\contoso_fs\home_directories\asherwood],[],[],,,,,,,[0],[],[],[omitted],[0],[],[omitted],[0],[],[],[omitted],[]
    Attached Files
Working...