I have a database of user information but I want to set the first character of column called firstName
into a capital letter. I tried doing a for-each loop calling the column name in the script to covert it using the Get-Culture class, but my method is not working, how can I accomplish this conversion?
$UserList = Import-Csv C:\Users\Administrator\Desktop\salesdbs.csv
$UserList | Select-Object -First 100 | Format-Table -AutoSize
$UserList = foreach ($firstName in $UserList) {
$UserList = (Get-Culture).TextInfo.ToTitleCase($UserList)
}
Echo "$UserList"