Cannot connect Azure Files share as Z drive

Ash 56 Reputation points
2022-12-21T22:26:50.463+00:00

The connection script provided by Azure Files shows the following result; however, no Z drive is created.

Can someone please help?

The end user is logged into an Azure AD-joined PC.

Azure AD Kerberos is set as the authentication source on Azure Files.

Azure AD is synced with a domain controller using Azure AD Connect.

PS C:\Users\user\Desktop> .\connect-file-share.ps1  
  
Name           Used (GB)     Free (GB) Provider      Root                                                                                                                     CurrentLocation  
----           ---------     --------- --------      ----                                                                                                                     ---------------  
Z                   0.14     102399.86 FileSystem    \\storage.file.core.window...  
  

272910-image.png

273041-image.png

Azure Files
Azure Files
An Azure service that offers file shares in the cloud.
1,384 questions
0 comments No comments
{count} votes

3 answers

Sort by: Most helpful
  1. Ash 56 Reputation points
    2022-12-23T03:58:21.933+00:00

    What resolved this issue was adding a "-Scope Global" parameter to the New-PSDrive command.

    The script must also run as an administrator.

    New-PSDrive -Name Z -PSProvider FileSystem -Root "\\storage.file.core.windows.net\file-share" -Persist -Scope Global  
    
    2 people found this answer helpful.

  2. Ramya Harinarthini_MSFT 5,351 Reputation points Microsoft Employee
    2022-12-22T05:27:31.297+00:00

    @Ash Welcome to Microsoft Q&A, Thank you for posting your here!

    No folder with a drive letter in "My Computer" or "This PC"

    If you map an Azure file share as an administrator by using the net use command, the share appears to be missing.

    Cause

    By default, Windows File Explorer doesn't run as an administrator. If you run net use from an administrative command prompt, you map the network drive as an administrator. Because mapped drives are user-centric, the user account that is logged in doesn't display the drives if they're mounted under a different user account.

    Solution

    Mount the share from a non-administrator command line. Alternatively, you can follow this TechNet topic to configure the EnableLinkedConnections registry value.

    Reference article: https://learn.microsoft.com/en-us/azure/storage/files/storage-troubleshoot-windows-file-connection-problems?tabs=azure-portal#no-folder-with-a-drive-letter-in-my-computer-or-this-pc

    Hope this helps!
    Kindly let us know if the above helps or you need further assistance on this issue.

    ---------------------------------------------------------------------------------------------------------------------------

    Please do not forget to "Accept the answer” and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.

    1 person found this answer helpful.

  3. Luke Murray 11,256 Reputation points MVP
    2022-12-22T05:23:47.42+00:00

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.