In this blog post, I will show you how to remove a number of characters from a string using PowerShell.
Substring
In the following code, I will use a PowerShell method called substring, which takes a string and remove a number of characters we defined in the method as you will see below.
The code below has a variable $string with the value “ntweekly.com”, I will use the method and remove the first 8 characters from the sting.
$String = 'NTweekly.com' $String.Substring(8)
Processing…
Success! You're on the list.
Whoops! There was an error and we couldn't process your subscription. Please reload the page and try again.