Existing SMB Connection Doesn’t Exist and Can’t Be Disconnected

Welcome Forums General PowerShell Q&A Existing SMB Connection Doesn’t Exist and Can’t Be Disconnected

Viewing 1 reply thread
  • Author
    Posts
    • #274224
      Participant
      Topics: 2
      Replies: 14
      Points: 14
      Rank: Member

      After deciding (perhaps wrongly) that “net use” is not the Powershell way, and that New-PSDrive is the non-preferred older way, I’m trying to use New-SmbMapping to map a drive, but it keeps failing with an existing remembered connection. So I’m doing experiments, as below, and am reduced to finding no explanation and having to ask here … “Why am I seeing the following behavior?!”

      In the above, you can see who I am as I run this experiment.

       

      In the above, you can see there’s an existing connection to \\filecab\drawer1. I’m unsure how this connection is being established, although it’s possible I connected to this share at some time in the past, but I can find no evidence via the GUI of being connected.

       

      In the above you can see that, yep, there’s a SMB connection. But when I try to disconnect it…

       

      If I understand the above, it says the connection that exists doesn’t really exist.

      I don’t understand. Hopefully someone here can enlighten me as to what I’m doing wrong. Thanks!

    • #274575
      Participant
      Topics: 0
      Replies: 9
      Points: 55
      Helping Hand
      Rank: Member

      The Powershell drives are here:

      > Get-PSDrive

      The UNC Drives are here:

      > net use

       

      I Think you have stored the Password in Windows:

      The WindowsPasswords for UNC Path (and others) are here:

      > rundll32.exe keymgr.dll, KRShowKeyMgr

       

       

Viewing 1 reply thread
  • You must be logged in to reply to this topic.