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 -

android - IBM Worklight 6.1 [Application Error] There was a network error (file:///android_asset/www/index.html) -