PowerShell PowerShell $LongitudMax = 10 $Texto = 'Texto para acortar' if ($Texto.Length -gt $LongitudMax) { $Texto.Substring(0,$LongitudMax) + '...' } else { $Texto } 1234567891011 $LongitudMax = 10$Texto = 'Texto para acortar' if ($Texto.Length -gt $LongitudMax){$Texto.Substring(0,$LongitudMax) + '...'}else{$Texto}