
Recently I needed to perform some housekeeping on a Windows folder. Part of this work required that the filenames be in lowercase. I know, in a usually case insensitive Operating System but bear with me. A search found this answer on Stackoverflow.
dir <<YOUR FOLDER HERE>> -r | % { if ($_.Name -cne $_.Name.ToLower()) { ren $_.FullName $_.Name.ToLower() } }
The answer gives a detailed explanation on how it works which I won’t repeat here. At the time of this post there was a comment stating this script will not rename folders.
Demo
Here is a folder with filenames in a variety of cases:

Start PowerShell and execute the script. In this example the script is executed from the folder which contains the files that I want to change so I use the full stop character . as a shortcut for the current folder.
dir . -r | % { if ($_.Name -cne $_.Name.ToLower()) { ren $_.FullName $_.Name.ToLower() } }
The case of the files in the folder are now uniform

Don’t run unknown scripts from the iNtErNeT
I know you wouldn’t but before running this script, try it out in a sandbox and make sure it does exactly what you expect it to do.
Acknowledgements
Thanks to the people behind the Stackoverflow question and the answer.