Recently had a need to remove the spaces from a string in powershell. Here is a really simple way to do so:
1 2 3 4 |
$Account = "Test Account Test Account" $Account = $Account.replace(' ','') $Account |
That will return “TestAccountTestAccount”
Recently had a need to remove the spaces from a string in powershell. Here is a really simple way to do so:
1 2 3 4 |
$Account = "Test Account Test Account" $Account = $Account.replace(' ','') $Account |
That will return “TestAccountTestAccount”