title: "net use" in PowerShell without specifying drive
body: <p>With "net use", you could do the following:</p>
  
  <pre><code>net use \\server /user:domian\username
  </code></pre>
  
  <p>It would then prompt for a password, and any further CIFS connections made to that server using any program (cmd, Explorer, Word, etc) would automatically use that credential.</p>
  
  <p>Is there an equivalent way of doing this in PowerShell? I know New-PsDrive usually provides the answer for "net use", but it requires a drive letter to map:</p>
  
  <pre><code>PS C:\WINDOWS\system32&gt; New-PsDrive -PSProvider FileSystem -Root \\server -Credential domain\user
  cmdlet New-PSDrive at command pipeline position 1
  Supply values for the following parameters:
  Name: 
  New-PSDrive : Cannot bind argument to parameter 'Name' because it is an empty string.
  At line:1 char:1
  + New-PsDrive -PSProvider FileSystem -Root \\server -Credential domain ...
  + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      + CategoryInfo          : InvalidData: (:) [New-PSDrive], ParameterBindingValidationException
      + FullyQualifiedErrorId : ParameterArgumentValidationErrorEmptyStringNotAllowed,Microsoft.PowerShell.Commands.NewPSDriveCommand
  </code></pre>
  
  <p>I don't want to map a drive, I just want to say "when I connect to this server, use this credential".  Is there a way?</p>