title: PowerShell - Net Use check if exists
body: <p>I'm doing a Power-Shell script to remove connection without using the <code>net use * /delete</code>. Is that any way i can check on the connected Remote first before i proceed to drop it? I tried this, but its not working as i thought. I open to any suggestion. </p>
  
  <pre><code>$conns = net use
  foreach ($con in ($conns | select Remote)) {
      if($con -eq "//MyServerB/C$") {
         net use "//MyServerB/C$" /delete
      }
  }
  </code></pre>