Link to home
Start Free TrialLog in
Avatar of CiscoAzn
CiscoAznFlag for United States of America

asked on

Powershell script to import csv and to export file with samaccountname

Powershell import a csv file that already has first name, last name, and email address and need to add another column for samaccountname.
Avatar of CiscoAzn
CiscoAzn
Flag of United States of America image

ASKER

Receiving errors. You don't have a closing bracket and it's also giving me Cannot convert the "-properties" value of type.
Avatar of Timothy McCartney
Do you just need an additional column added with no actual data?

For example... You feed the script a csv file with the headers you've mentioned, and then it outputs an identical csv file with an additional, empty samaccountname field?

Or... Are you wanting to capture the samaccountname data as a part of the script and export all the data into a new csv file? Your question is a tad unclear on what you're trying to accomplish.
Yes that's correct export out with another column that include the samaccountname. sorry for the confusion.
Post your script
ASKER CERTIFIED SOLUTION
Avatar of Gopi Raju
Gopi Raju

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial