Headers in Powershell are incorrect
Headers in Powershell are incorrect After importing a CSV file, I create a hashtable of the variables that will be used in a simple command line. Problem is that when I import the CSV files, the headers are transposed; instead of it being a table with various headers, it is different. My code is: $Import = Import-Csv "Filepathinput.csv" foreach ($user in $import) { $msolparams = @{ UPN = $user.SamAccountName + "@company.com" Title = $user.JobTitle Deparment = $user.DepartmentTitle Displayname = $user.Pname + "," + " " + $user.Plname Location = $user.location} Set-MsolUser -UserPrincipalName $msolparams.UPN -Title $msolparams.Title -Department $msolparams.Department -DisplayName $msolparams.Displayname} After checking the $import variable with the CSV file input, the hashtable headers come out as so: $import SamAccountName : kodak.black Location : Central JobTitle : Title DepartmentTi...
