Jump to content
EduGeek EdSec 2026 is Go! 27th Oct in Derby! Join us for a day of EdTech security focused talks, networking, and an evening social ×

Recommended Posts

Posted

I have a csv file which I am trying to read which contains very basic information but when I assign variables it only seems to assign the first of them. I have Name, Account Name, ID as headers for the csv file and when I use import-csv I can assign the Name& AccountName but if I try it with ID it shows blank.

 

I'm using

...

foreach ($row in $check)

{

$name = $row.Name

$Samaccount = $row.AccountName

$id = $row.ID

...}

 

but if I try and reference $id it shows empty. I'm not sure why it would work for Name but not for ID.

 

Any ideas?

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...