If you need to convert some text to lower or UPPER case, this can be easily done from the command-line using the Windows PowerShell.
In this short note i will show the examples of how to convert a string in PowerShell to lowercase or UPPERCASE using the ToLower()
or ToUpper()
methods respectively.
Cool Tip: Split a long command over multiple lines in PowerShell! Read more →
Convert String To lowercase | UPPERCASE In PowerShell
To convert a string to lowercase in Powershell, use the ToLower()
method:
PS C:\> "String".ToLower() string
To convert a string to UPPERCASE in Powershell, use the ToUpper()
method:
PS C:\> "String".ToUpper() STRING
Cool Tip: Get history of previously executed commands in PowerShell! Read more →