locked
Persisting connections to Microsoft Azure Files RRS feed

  • Question

  • Hello everybody,

    as already asked from several people who seemed to have the same problem.

    It is not possible for me to map a azure Storage account to my local Windows 10 (1809)

    I tried it on several machines, all with the same outcome. It will not persist after a reboot.

    And yes, i know the nice article how to persist connections to Microsoft Azure Files very well. And it still does not work after a reboot. After mapping the Drive it is completely accessible, and after a reboot it is still mapped. It just keeps asking for the credentials after the reboot, which are stored with CMDKEY.

    This topic is super frustrating and i really need a solution for deploying this to a customer.

    Many thanks to all hints in advance.

    Regards TheDude-inator


    Thursday, February 7, 2019 10:36 AM

Answers

  • Hello Thedude-inator,

    Thanks for posting here. I would recommend you to run the following Power Shell commands and change the storage account name and key to persist the credentials even if reboot.

    Invoke-Expression -command "cmdkey /add:<storageaccountname>.file.core.windows.net /user:<storageaccountname> /pass:<storagekey>"
    
    New-PSDrive -Name Z -PSProvider FileSystem -Root "\\storageaccountname.file.core.windows.net\fileshare" -persist

    You can also refer the following article here. Hope this helps you. Let us know if you need any further query.



    Thursday, February 7, 2019 11:03 AM
  • Thanks again for the Ideas.

    The steps mentioned (Windows-Version, Ports) where already checked.

    The connection did work, just persisting the credentials after a reboot did not.

    I just tried it again - Same Powershell command as last week - and it worked. Several Reboots, different devices.

    At that point i can only suppose the problem was connected to the recent Azure DNS Problems and pray it wont happen again.
    Thank you all for your help.

    • Marked as answer by TheDude-Inator Monday, February 11, 2019 8:02 AM
    Monday, February 11, 2019 8:02 AM

All replies

  • Hello Thedude-inator,

    Thanks for posting here. I would recommend you to run the following Power Shell commands and change the storage account name and key to persist the credentials even if reboot.

    Invoke-Expression -command "cmdkey /add:<storageaccountname>.file.core.windows.net /user:<storageaccountname> /pass:<storagekey>"
    
    New-PSDrive -Name Z -PSProvider FileSystem -Root "\\storageaccountname.file.core.windows.net\fileshare" -persist

    You can also refer the following article here. Hope this helps you. Let us know if you need any further query.



    Thursday, February 7, 2019 11:03 AM
  • As far as I recall, you first need to persist the credentials with CMDKEY and then create a drive mapping WITHOUTH providing the credentials

    hth
    Marcin

    Thursday, February 7, 2019 11:10 AM
  • Hello YASWANTHM-MSFT,

    now i used following command but masked the private information for this post.

    Powershell tells me the credentials were added and the Drive Y was mapped.
    Now i cant even see the Drive Y, or CD into it.
    Doublechecked the User in Powershell with whoami, was in fact my user.
    Still no drive in Explorer, even after a reboot.

    I guess the hint from Marcin was followed as well, as there are no credentials in the New-PSDrive


    Invoke-Expression -command "cmdkey /add:secretstorageaccount.file.core.windows.net /user:AZURE\'tis the user /pass:Here goes the Secret ending with =="

    New-PSDrive-Name Y -PSProvider FileSystem -Root "\\secretstorageaccount.file.core.windows.net\crm"-persist


    Thursday, February 7, 2019 1:24 PM
  • @TheDude-Inator, Correct me if I’m wrong, I believe previously when you followed the steps mentioned in the article here for mounting file share in the virtual machine using PowerShell. When you reboot the VM, did you get the below error with notification and when you navigate to the mounted drive it will disappear? Could you confirm that you got the below error?


    Thursday, February 7, 2019 3:59 PM
  • Hi,

    I have published an article as below. Please try if it helps

    http://cloudcompute.info/use-an-azure-file-share-with-windows/


    Regards From: Exchange Online | World of Cloud Computing

    Thursday, February 7, 2019 5:09 PM
  • Hello everyone, thanks a lot for the answers.

    i have been just informed, that the share seems to persist on one customers laptop, that is weird, because on 3 other devices mounting the share persistently does not work.

    ManU PhiliP,

    thanks for the Article, i already tried it the mounting process in the GUI. The file share already contains data, so it is not possible to create a new one with the Azure Powershell.

    @YASWANTHM-MSFT

    Yes i do get this error notification after a reboot, but when i navigate to the drive it does not disappear. It will prompt for credentials, as if the password for the share does not match the password in the credentialstore. Reentering the key does not help. The checkbox "remember my credentials" does not work either.

    A screenshot of the network credential dialog

    Additionaly, it is not a VM where the share is mounted, but physical devices. I guess thats not that important.



    Monday, February 11, 2019 6:40 AM
  • @thedude-inator, Just for clarification May I know for which  "physical devices" you are  referring too 
    Monday, February 11, 2019 6:56 AM
  • @ YASWANTHM-MSFT

    Well i do have 3 Notebooks on my Table with Windows 10 x64. All Dell Latitude 5591.

    I strongly believe these are physical as i can touch them?

    I just wanted to make clear the problem is not about a VM or Azure-VM.

    Regards

    Monday, February 11, 2019 7:08 AM
  • Currently the Azure file share is supported for windows 10 versions are (1507, 1607, 1703, 1709, 1803, and 1809). Could you check which version of windows 10 you are using,

    To check the version, please follow the below steps.

    • Select the Start  button, then select Settings  > System > About.
    • Under Device specifications, you can see if you're running a 32-bit or 64-bit version of Windows.
    • Under Windows specifications, you can find out which edition and version of Windows your device is running.
    • You can also press the Windows logo  key + R, type winver in the Open box, and then select OK to find out which version of Windows your device is running.

    Also ensure that the SMB protocol requires TCP port 445 to be open; connections will fail if port 445 is blocked. You can check to see if your firewall is blocking port 445 with the Test-NetConnection cmdlet as described here.


    Monday, February 11, 2019 7:51 AM
  • Thanks again for the Ideas.

    The steps mentioned (Windows-Version, Ports) where already checked.

    The connection did work, just persisting the credentials after a reboot did not.

    I just tried it again - Same Powershell command as last week - and it worked. Several Reboots, different devices.

    At that point i can only suppose the problem was connected to the recent Azure DNS Problems and pray it wont happen again.
    Thank you all for your help.

    • Marked as answer by TheDude-Inator Monday, February 11, 2019 8:02 AM
    Monday, February 11, 2019 8:02 AM
  • @thedude-inator, 

    Glad to know that your issue has resolved. And thanks for sharing the solution, which might be beneficial to other community members reading this thread.

    If the above answers helps you . Please “Mark as Answer” and Up-Vote for the same. And, if you have any further query do let us know.


    Monday, February 11, 2019 8:05 AM