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

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -