Converting VBScript's LCase Function

Definition: Returns a string that has been converted to lowercase.


Using Windows PowerShell, can you convert all the characters in a string to their lowercase equivalent? Of course you can; all you have to do is call the ToLower() method. For example, here we assign 26 uppercase letters to the variable $a; we then use the ToLower() method to convert all the characters in the string to lowercase:

$a = $a.ToLower()

When you run this command and then echo back the value of $a you should get the following:


Return to the VBScript to Windows PowerShell home page