Summary: Use Windows PowerShell to retrieve the first 140 characters from a string.
How can I use Windows PowerShell to retrieve the first 140 characters from a string?
Use the SubString method from a string. Specify the starting point (in this case 0) and the
number of characters to retrieve (in this case 140). The following example assumes that $a
contains a string with more than 140 characters:
$a.SubString(0,140)