0 votes

Hi support,

[https://www.adaxes.com/questions/752/import-data-wizard]

I am trying to do something similiar to this however in our csv file the column is called 'Termination Date' and we cannot change that.

Based on this would you suggest we map this column to Customattributetext1 and then have a business rule 'Before updating a user' on this atrtibute which runs a powershell task as you have highlighted to add the ldap value to the accountExpires attribute?

related to an answer for: Import Data Wizard
by (110 points)

1 Answer

0 votes
by (294k points)

Hello Mike,

There is no need to overcomplicate things this much. You can just use Script 2: Only update existing users from the following repository article to perform the import: https://www.adaxes.com/script-repository/import-new-and-updated-users-from-csv-file-s246.htm.

0

Hello,

So with that script (#2) I just add the following:

$customColumnNames = @{
    "Termination Date" = "accountExpires";

When I run with this I get an error 'parameter is incorrect'

I currently have this at the top:

$csvFilePath = "c:\temp\ITUserreport-test.csv" # TODO: modify me
$userIdColumn = "employee ID" # TODO: modify me
$userIdProperty = "employeeID" # TODO: modify me
$accountPasswordColumn = "AccountPassword" # TODO: modify me
$customColumnNames = @{
    "Termination Date" = "accountExpires";
} # TODO: modify me
$aDObjectProperties = @("Manager") # TODO: modify me
$skipEmptyColumnNames = @("Last Name","Office Location (Office Location Description)","Line Manager","Position Position Title (Label)","Department (Label)","Business Unit (Label)","Users Sys Id","First Name","Preferred Name","Title (Label)","Email","Division (Label)","Job Classification (Label)","Fixed Term End Date","Start Date","Original Start Date","Continuous Service Start Date","Line Manager (Last Name)","Line Manager (First Name)") # TODO: modify me
0

Hello Mike,

For troubleshooting purposes, please, send us (support@adaxes.com) the CSV file you are using.

0

Hello Mike,

As you want to only update the Account Expires property, the $aDObjectProperties variable should be set to an empty array.

$aDObjectProperties = @() # TODO: modify me

Also, make sure to specify a valid expiration date in the corresponding column of CSV file.

0

Hello Mike,

Thank you for the provided details. The issue occurs because you provided a mapping only for one property while there are much more columns in the CSV file. As a result, for all the other columns, their headers were users as property schema names which caused the issue. Specifying column names in the $skipEmptyColumnNames variable only influenced empty columns, but not jsut al specified. We updated the script accordingly. You can copy it from the article. In your case, the variable should be set exactly as below. Pay attention to the $ignoreUnspecifiedColumns variable.

$csvFilePath = "c:\temp\ITUserreport-test.csv" # TODO: modify me
$userIdColumn = "employee ID" # TODO: modify me
$userIdProperty = "employeeID" # TODO: modify me
$accountPasswordColumn = "AccountPassword" # TODO: modify me
$customColumnNames = @{
    "Termination Date" = "accountExpires";
} # TODO: modify me
$ignoreUnspecifiedColumns = $True # TODO: modify me
$aDObjectProperties = @() # TODO: modify me
$skipEmptyColumnNames = @() # TODO: modify me
0

Hi support,

Apologies if already answered this.

When we import the date from csv into our account expiry it always sets the date to the day before.

For example if the date in csv is 17/05/2024 the script runs and sets it to 16/05/2024. Is this expected?

Thanks as always for support.

0

Hello Mike,

The behavior is expected in case of the Account Options property. It comes from AD itself and is not related to Adaxes.

0

ah I see yes, is there a solution to ensure the account expires at the end of the stated day?

or after a certain time?

0

Hello Mike,

Unfortunately, there is no such possibility. Also, it is not actually that simple. An account will expire on the actual date you set to the Account Expires property, however in the properties you will always see the end of the previous day.

For example, if you set Account Expires to 6:55 PM 4/24/2024 that is exactly when the account will expire. However, in the properties of the account you will see 4/23/2024.

You can see the actual expiration date in Adaxes Administration console (just select the account and check the value on the right) or in the Attribute Editor in ADUC.

Related questions

0 votes
1 answer

Is it possible to import a list of user CN values via CSV file into the basket of the web interface or the console to perform an operation?

asked Aug 15, 2014 by rgreggs (250 points)
0 votes
1 answer

Hello, I'm trying to create a business rule that will update a user account expiry date when that user logs in for the first time. I'm new to Adaxes, so I don't have a ... updated by a user's action, such as "Last Logon". Is it possible to make this work?

asked Mar 6 by sjjb2024 (60 points)
0 votes
1 answer

hello i'm new with Adaxes i'm try to creat schuadle task to import a spefice user list by thier username id after that just update City for them by bulk updating . kinly advise

asked Aug 29, 2023 by sudox (20 points)
0 votes
1 answer

Is there a way to update a distribution group using a CSV file as the source through the web portal? This script is an example of how I would do in manually ... import-csv C:\Distro1.csv | foreach {add-distributiongroupmember -id Distro1-member $_.Name }

asked Dec 11, 2012 by mdeflice (350 points)
0 votes
1 answer

Hi, We've got a business rule setup that when an account is expired it mails certain people to take certain actions. This works fine, however we've had an issue lately, where ... as per point 1, but lists the old expiry and new expiry date. Thanks in advance

asked Feb 13, 2018 by gazoco (490 points)
3,589 questions
3,278 answers
8,303 comments
548,107 users