title: PowerShell out-file not working when variable has a "/" in filename
body: <p>I have a powershell script that is running a GET and saving the results to file. the name of the file is using a variable from the GET URL however, then a forward slash exist "/". the file is not saved because it does not like the  forward slash.</p>
  
  <pre><code>$hostURL = "my_webserver"
  $methType = "GET"
  $api4 = "/sasl_logs/debug"
  $txt | out-file ".\$api4.txt"
  </code></pre>
  
  <p>Results is a file called /sasl_logs/debug.txt or /sasl_logs_debug.txt. I have tried to get replace function working but i must be doing something wrong. </p>
  
  <pre><code>$api4.replace("//","_")
  $api4.replace("/","_")
  $api4.replace("\/","_")
  </code></pre>