PowerShell convert string to title case - PsCustom Object - Hitchikers GUID(e) to Automation

PHOTO EMBED

Tue Oct 18 2022 13:31:35 GMT+0000 (Coordinated Universal Time)

Saved by @gmalone

$myString = "STRing WIth Mixed CaSe"

# Instantiate required object
$textInfo = (Get-Culture).TextInfo

# Convert String
$textInfo.ToTitleCase($myString)

# Output
String With Mixed Case
content_copyCOPY

https://pscustomobject.github.io/powershell/PowerShell-Convert-to-Title-Case/