How can I easily remove a string of text in PowerShell

HowTo

Q. How can I easily remove a string of text in PowerShell?

A. A simple way to remove a string from a string is to search for the string to be replaced and substitute with a blank string. For example to remove LAB I could use:

$LabShortName = $Lab.Name.Replace(«LAB»,»»)

 

http://www.itprotoday.com/management-mobility/remove-string-string-powershell

Добавить комментарий