0 votes

Hi, I'm following the guide about scheduling a user import from a CSV file: Schedule Import of Users from CSV

but I get the following error:

*"The input object cannot be bound to any parameters for the command either because the command does not take pipeline input or the input and its properties do not match any of the parameters that take pipeline input. Stack trace: at <ScriptBlock>, <No file>: line 7".

Any help would be much appreciated.

Dario

by (40 points)
0

Hello,

Could you, please, post here or send us (support[at]adaxes.com) an example of the CSV file you are using for import? Also, please, provide us with the full script you are using.

0

Hi,

the script is pretty basic:

==================== Import-Module Adaxes

$file = "C:\temp\users.csv" $targetDN = "%distinguishedName%" $domain = $Context.GetObjectDomain($targetDN)

Import-CSV $file | New-AdmUser -Path $targetDN -AdaxesService localhost -Server $domain

The csv file is as follows:Annotazione 2019-12-17 113404.jpg

Thank you

Dario

0

Hello Dario,

Thank you for the provided details. The script and the CSV file look correct. Could you, please, post here or send us (support[at]adaxes.com) a screenshot of the Scheduled Task you created with the Activity Scope? We need something like the following: image.png

0

Hi, here's the screenshotAnnotazione 2019.2.jpg

1 Answer

0 votes
by (294k points)

Hello Dario,

Thank you for the provided screenshot. The Scheduled Task looks correct. For the import to work, please, make sure that columns in the CSV file are separated by commas, not semicolons.

Also, the Name parameter is required when executing the New-AdmUser cmdlet. You need to add the column with the name header to the CSV file. Alternatively, you can replace the cn header.

0

Hi,

that solved the error but now I get a new one:

image.png

Thank you

Dario

0

Hello Dario,

Most probably, the error occurs because one of the values in the CSV file is not specified correctly. It should work fine with the properties displayed in the screenshot you provided earlier. Did you add new columns to the file? If so, please, make sure that the values in the columns are correct. For example, such an error can occur if you add the manager column to the CSV file and the values in the column are not distinguished names (DN).

0

Well if I save the script i get a warning on exit and also inside the debugger I get an error on the -path parameter

image.png

Thank you

0

Hello Dario,

The script is correct. It is just that the cmdlet data is not loaded yet and that is why you get the error and the cmdlet parameters get underlined. You can see the data being loaded in the bottom left corner of the script editor.

Related questions

0 votes
1 answer

Trying to test importing users via CSV. Running into the following error -- Error: The input object cannot be bound to any parameters for the command either because the command does ... in the Powershell script, but no luck -- Here's my scheduled task --

asked Apr 10 by msinger (210 points)
0 votes
1 answer

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 ... powershell task as you have highlighted to add the ldap value to the accountExpires attribute?

asked Feb 19 by MikeBeattie (110 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

Have a csv file of users that I need to import into Adaxes. I had initially found an article for this, but upon going today, it gave me an error (looks like it was deleted). Thank you

asked Nov 19, 2022 by wangl (20 points)
0 votes
1 answer

I am trying to make the amount of users using csv. I noticed when I use the "Manager" field of the error. Question1: How should I put the information? Initially I put the ... "Tony Stark". Question2: Can I import the users and set the group in the csv file?

asked Jun 18, 2019 by user1928 (550 points)
3,589 questions
3,278 answers
8,303 comments
548,118 users