0 votes

I have a third-party provider that is asking us for the Name,Phone,Email,Job Title, & Office of every new hire we get sent tot hem in a .CSV file at the end of the week so they can import them into thier software.

If we have a file at c:\user.csv is there a script that we could use that would append that file each time we add a new user?

Thank you,

by (5.8k points)


Unfortunately, there is no such script. However, we can write it for you. It will be executed in a Business Rule triggering After creating a user and append the necessary data into the CSV file. If the solution meets your needs, please, provide us with a sample of the CSV file, clarify the LDAP names of user attributes whose values should be appended to the file and the corresponding column names where the values should be added. Then we will provide you with the script and detailed instructions.

For your information, if you have multiple instances of Adaxes service that share common configuration, the file should be stored in a network share folder. This way, each instance of Adaxes service will be able to write updates into the same file instead of into the separate local ones.


Sample of the CSV CSV.PNG

CSV = Active Directory Attribute Name = cn Phone = telephoneNumber Email = mail Job Title = title Office = physicalDeliveryOfficeName

File Location would be on a network. \server\folder\sms.csv

Let me know if there is anything I missed or anything else you may need.

1 Answer

0 votes
by (214k points)


Thank you for the provided details. To create the Business Rule:

  1. Launch Adaxes Administration Console.
  2. In the Console Tree, right-click your service node.
  3. In the context menu, navigate to New and click Business Rule. image.png
  4. On step 2 of the Create Business Rule wizard, select the User object type.
  5. Select After crating a user and click Next. image.png
  6. Click Add an action.
  7. Select Run a program or PowerShell script.
  8. Paste the below script into the Script field. In the script:
  • $path – Specifies the path to the CSV file.
  • $properties – Specifies a map of CSV column names to the value references of corresponding properties.
$path = "\\server\share\users.csv" # TODO: modify me
$properties = [ordered]@{
    "Name"= "%cn%";
    "Phone" = "%telephoneNumber%";
    "Email" = "%mail%";
    "Job Title" = "%title%";
    "Office" = "%physicalDeliveryOfficeName%"
} # TODO: modify me

New-Object PSObject -Property $properties | Export-Csv -Path $path -Append -NoTypeInformation
  1. Enter a short description and click OK. image.png
  2. Click Next and finish creating the rule.

Related questions

0 votes
0 answers

I am trying to work out a method to create Drop-Down lists to select printers and printer properties. Using PowerShell I can extract a list of printers and printer properties to either ... or CSV file for my drop-down lists. Any ideas on how to do this? Thanks

asked Sep 17, 2019 by Fixxer (250 points)
0 votes
1 answer

We are using the following the script and would like to have it updated to use a CSV file instead of the list option. Thank you in advance for your assistance. ... error occurred when updating user. Error: " + $_.Exception.Message, "Warning") }

asked Jun 5, 2017 by willy-wally (14.5k points)
0 votes
1 answer

Maybe this is simpler than I realize, but at the moment it isn't obvious to me. I'm trying to ADD a note to a user property without replacing it. In the ... date time stamp with this custom note. All of the existing information remains inside the notes field.

asked Jan 30, 2015 by JoeC (3k points)
0 votes
1 answer

We are in the process of upgrading from Adaxes 2014.1 to Adaxes 2018.2. As part of the upgrade we plan on moving from a Windows Server 2012 R2 VM to Windows Server 2016 ... I need to get new key files for the Adaxes 2018.2 deployments? Thank you in advance.

asked Mar 15, 2019 by lgibbens (1.4k points)
0 votes
1 answer

Forgive me if this topic has been discussed elsewhere i searched and didn't find anything. What I would like to have adaxes do is on a nightly basis 1. go to a folder it ... disabled by adaxes $date" } Is this possible #4 eludes me a bit. Thank you in advance.

asked Jun 19, 2018 by dexion11 (280 points)
2,135 questions
1,900 answers
3,535 users