NobleMan
NobleMan

Reputation: 515

Field will not populate in hash table

import-csv c:\temp\aduserimport.csv |
Select-Object -property *,
          @{ name = 'SamAccountName'; expression = { $_.Login } },
          @{ Label = 'Name'; expression = { $_.login } },
          @{ Label = 'Department'; expression= { $_Dept }}

The csv file looks like this. It shows the DEPT instead of the Department value. The Login should not be there either. It also show What am I doing wrong?

login,dept,city,title

Jimmy Jawn,it,philadelphia,president

Yet my results look like this

login : Jimmy Jawn

dept : it

city : philadelphia

title : president

SamAccountName : Jimmy Jawn

Name : Jimmy Jawn

Department :

Upvotes: 0

Views: 33

Answers (1)

NobleMan
NobleMan

Reputation: 515

helps to put a period in the $_.dept :)

Upvotes: 1

Related Questions