How do I remove multiple characters in a string
<p>I've been trying to find the best way to string together a remove command, but I'm not understanding how to do this in one string vs multiple...
I'm wanting to remove all spaces and all underscores; I know I can do them individually like this: </p>

<pre><code>$Name = "\Test Name\Test_Underscore 1_2"
$NameFull1 = $NAME -replace '\s'
$NameFull2 = $NameFull1 -replace '_',''
</code></pre>

<p>And have an output like this: </p>

<pre><code>TestNameTestUnderscore12
</code></pre>

<p>However I'm wanting to just do it once, but I'm not sure how to combine them (I've been looking around for a while now and can't find an answer). </p>

<p>I was thinking it would look like this (and I've tried a few other ways as well), but keep running into an error... </p>

<pre><code>$Name = "\Test Name\Test_Underscore 1_2"
$NameFull = $NAME -replace '\s' | '_',''
</code></pre>