How to mount fileshare storage account for all users in VDI?

Prashanth Gopalapuram 0 Reputation points
2024-04-15T06:25:09.35+00:00

I want to mount a file share storage account for all users accessing the Azure VDI.

Azure Storage
Azure Storage
Globally unique resources that provide access to data management services and serve as the parent namespace for the services.
3,542 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Sumarigo-MSFT 47,471 Reputation points Microsoft Employee Moderator
    2024-04-16T03:15:08.0033333+00:00

    @Prashanth Gopalapuram Welcome to Microsoft Q&A Forum, Thank you for posting your query here!

    To mount an Azure file share storage account for all users in a VDI environment, you can use Group Policy to create a logon script that maps the file share as a network drive. Here are the steps to do this:

    1. Create a batch file that maps the file share as a network drive. For example, you can create a file called "map_drive.bat" with the following contents:
    net use Z: \\[storage_account_name].file.core.windows.net\[file_share_name] /u:[storage_account_name]\[storage_account_key]
    

    Replace [storage_account_name] with the name of your storage account, [file_share_name] with the name of your file share, and [storage_account_key] with your storage account key.

    Save the batch file to a network location that is accessible to all users in the VDI environment.

    Open the Group Policy Management Console and create a new Group Policy Object (GPO) for the VDI environment.

    Edit the GPO and navigate to User Configuration > Policies > Windows Settings > Scripts (Logon/Logoff).

    Double-click on "Logon" and click "Add" to add a new logon script.

    Browse to the location where you saved the batch file and select it.

    Click "OK" to close the "Add a Script" dialog box.

    Click "OK" to close the "Logon Properties" dialog box.

    Close the Group Policy Management Editor.

    Link the GPO to the appropriate Organizational Unit (OU) in Active Directory that contains the VDI users.

    When users log on to the VDI environment, the logon script will run and map the file share as a network drive. This will allow all users to access the file share from within the VDI environment.

    Additional information: If you would like to follow the approach from the link, it is required that you use hybrid user identities. Cloud-only users aren’t supported to authenticate to Azure files.

    Please let us know if you have any further queries. I’m happy to assist you further.    


    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.
    0 comments No comments

  2. Patchfox 4,176 Reputation points
    2024-04-15T17:32:34.11+00:00

    Hi Prashanth Gopalapuram, I want to help you with this question.

    If I understand you correctly, you want to mount a file share in a storage account for every user who is logging into the VDI, right?

    I would prefer to work with Intune here and let Intune manage your VDIs. Then you can deploy settings and GPOs to your machine and the users will get the settings deployed when they have logged in.

    Otherwise, you have to configure the GPO settings manually on the VDI.

    You can enable EntraID Authentication for FileShare so the users should have access to the share imminently

    I hope this helps in the solution process.


    If the reply was helpful, please don’t forget to upvote or accept it as an answer, thank you!

    0 comments No comments

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.