Categories
Welcome Center
Education & Development
Discussions
Certification Preparation
Recent Posts
Groups
Free Resources
Ebooks
Free Workshops
Trending Certifications Infographic
Infosec Training
IT & Security Training
Live Boot Camps
Security Awareness Training
About Infosec Institute
Home
Discussions
IT & Cybersecurity
Powershell Child Item Question
HighlanderSword
When using get-childitem is there a way to upper case the selected results .
so for my example I'm returning the file name , I want to convert just the results of the below to uppercase as some files are in mixed case
Get-ChildItem "D:\*.*" -Recurse|select Name
Find more posts tagged with
Save $250 on 2025 certification boot camps from Infosec!
Book now with code EOY2025
Button
Comments
JDMurray
Have you tried using the ToUpper() method of the String object?
HighlanderSword
how do i do that when doing a select properties, i tried
Get-ChildItem "D:\" -Recurse | select name | select @{n='name';e={$_.toupper()}} and it returned no data at all
JDMurray
You need to specify the 'name' field you want to call the ToUpper method in.
$_.name.ToUpper()
Quick Links
All Categories
Recent Posts
Activity
Unanswered
Groups
Best Of
INFOSEC Boot Camps
$250
OFF
Use code
EOY2025
to receive $250 off your 2025 certification boot camp!
BROWSE BOOT CAMPS