powershell - Exporting a CSV adjusting a category with ToTitleCase -
#first name $givenname = import-csv .\documents\db1.csv | select givenname $userf = (get-culture).textinfo.totitlecase($givenname) $userf | export-csv .\documents\usersf.txt –notypeinformation when run script .txt file
#type system.string "length" "98" what want firstname category proper title case.
i think may simpler expected. update existing $givenname this:
$givenname|%{$_.givenname = (get-culture).textinfo.totitlecase($_.givenname)} then can $givenname|export-csv .\documents\usersf.txt -notypeinformation , there's no need create whole other variable exact same info.
Comments
Post a Comment