About 985,000 results
Open links in new tab
  1. Trim Your Strings with PowerShell - Scripting Blog [archived]

    Jul 18, 2014 · Luckily, by using Windows PowerShell and a few String methods, I can easily correct this situation. The System.String .NET Framework class (which is documented on …

  2. Trim() TrimStart() TrimEnd() - PowerShell - SS64.com

    Trim() Remove characters (by default, spaces) from the beginning or end of a string. Syntax .Trim([ Characters_to_remove ]) .TrimEnd([ Characters_to_remove ]) .TrimStart([ …

  3. How to Trim a string in PowerShell - LazyAdmin

    Nov 28, 2023 · Trim a string in PowerShell with the Trim () method. Remove trailing spaces, or characters from the beginning or end of a string.

  4. Master PowerShell Trim and TrimEnd Methods - ATA Learning

    Nov 12, 2020 · The PowerShell Trim(), TrimStart()and TrimEnd() methods are powerful string utilities for cleaning up data as needed. If those three methods don’t meet your needs, …

  5. How to Trim Strings in PowerShell?

    Jul 9, 2024 · To trim strings in PowerShell, you can use methods like Trim(), TrimStart(), and TrimEnd(). These methods help remove unwanted characters from the beginning, end, or both …

  6. Learn how to use the PowerShell Trim method - TechTarget

    May 18, 2023 · PowerShell's Trim() method can remove unnecessary spaces and other characters in strings. Follow this tutorial to learn how to use it in your PowerShell scripts.

  7. Trim characters from strings in PowerShell4sysops

    Mar 14, 2023 · This can be done using the trim methods. Trim() methods in PowerShell. If you want to delete the characters only at the beginning, use TrimStart(), and for trimming the string …

  8. PowerShell: Manipulating Strings with Trim, TrimStart and …

    Jun 23, 2021 · In PowerShell it’s easy to manipulate strings, especially to cut off some characters from a string. These three methods are your friends when it comes to trimming: Trim, …

  9. Cleaning Up Strings with PowerShell‘s All-Purpose Trim() Method

    Nov 2, 2023 · In this guide, you‘ve seen how Trim(), TrimStart(), and TrimEnd() provide simple yet powerful ways to clean up string whitespace and characters in Powershell. Whether trimming …

  10. Powershell trim string - Stack Overflow

    May 11, 2021 · You could remove everything up to and including the : with -replace, then let String.Trim() take care of the whitespace: PS ~> $string = "Account name: abc.def" PS ~> …

Refresh