title: In PowerShell, how can I determine if the current drive is a networked drive or not?
body: <p>I need to know, from within Powershell, if the current drive is a mapped drive or not.</p>
  
  <p>Unfortunately, Get-PSDrive is not working "as expected":</p>
  
  <pre><code>PS:24 H:\temp
  &gt;get-psdrive  h
  
  Name       Provider      Root      CurrentLocation
  ----       --------      ----      ---------------
  H          FileSystem    H:\          temp
  </code></pre>
  
  <p>but in MS-Dos "net use" shows that H: is really a mapped network drive:</p>
  
  <pre><code>New connections will be remembered.
  
  Status       Local     Remote                    Network
  -------------------------------------------------------------------------------
  OK           H:        \\spma1fp1\JARAVJ$        Microsoft Windows Network
  
  The command completed successfully.
  </code></pre>
  
  <p>What I want to do is to get the root of the drive and show it in the prompt (see: <a href="https://stackoverflow.com/questions/157923/customizing-powershell-prompt-equivalent-to-cmds-mpg">Customizing PowerShell Prompt - Equivalent to CMD&#39;s $M$P$_$+$G?</a>)</p>