How to configure automatic drive mapping for individual users on shared computers

A Cole 0 Reputation points
2023-11-15T17:56:30.5+00:00

Hi,

We have a school environment. We are currently trying to configure some computers and add them to Intune. These computers will be shared devices so used by multiple pupils. Is there a way that when each individual user logs in it maps there network drive? Each user has there own individual network drive.

Any help would be appreciated.

Thanks!

Microsoft Security Intune Other
{count} votes

2 answers

Sort by: Most helpful
  1. Q&A Assist
    2023-11-15T17:56:30.5166667+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    To configure automatic drive mapping for individual users on shared computers, you can use Group Policy or Intune. In Intune, you can create a PowerShell script that maps the network drive for each user when they log in. You can then deploy this script to the shared devices using Intune. Here are the high-level steps to create and deploy the script:

    1. Create a PowerShell script that maps the network drive for each user. You can use the New-PSDrive cmdlet to map the drive. Here's an example script:
    $Username = $env:USERNAME
    $DriveLetter = "Z"
    $NetworkPath = "\\server\share\$Username"
    New-PSDrive -Name $DriveLetter -PSProvider FileSystem -Root $NetworkPath
    

    This script maps the user's network drive to the Z: drive using the username as the folder name.

    1. Save the script to a location that the shared devices can access, such as a network share.
    2. In Intune, create a PowerShell script deployment profile. In the profile, specify the location of the script and any parameters that are required.
    3. Assign the deployment profile to the shared devices.

    When a user logs in to a shared device, the script will run and map their network drive. Note that the script will run with the user's permissions, so they will need access to the network share where the script is stored.


    References:

    0 comments No comments

  2. ZhoumingDuan-MSFT 17,165 Reputation points Microsoft External Staff
    2023-11-16T06:27:05.0066667+00:00

    @A Cole,Thanks for posting in Q&A.

    From your description, I know that you want to configure automatic drive mapping when each individual user logs in.

    Based on my research, you can refer the links below and deploy a PowerShell script to configure it.

    https://sysmansquad.com/2020/12/16/mapping-network-drives-on-intune-devices/

    https://tech.nicolonsky.ch/next-level-network-drive-mapping-with-intune/

    Hope this can be helpful.

    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


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.