nicolonsky / IntuneDriveMapping

Generate PowerShell scripts to map network drives on Intune managed Windows 10 devices
https://intunedrivemapping.azurewebsites.net/
MIT License
148 stars 17 forks source link

Addressing %USERNAME%, and various file servers on the script? #54

Open rasans opened 4 months ago

rasans commented 4 months ago

we've already mapped several drives with this method and all of them work as expected. So, I wanted to try it for other scenarios as well.

We maintain multiple servers designated for Home Drives (H Drives), and these servers are named according to the usernames and the groups to which they belong. For example, members of Group X should access their drives at \Server01\%USERNAME%, whereas Group Y members should use \Server02\%USERNAME%, and so forth. This naming convention is intended to work with the %USERNAME% variable. This means that we aim to map different shares depending on the user who logs into a workstation, and making their H drive accessible to them. Additionally, we manage a variety of file servers and shared drives, all identified by %USERNAME%, resulting in multiple UNC Paths. So, I’m wondering how should I address multiple file servers and %USERNAME% on this method?

I've already tried \Server01\%USERNAME% and it didn't work, but when I tried the same path for a specific users account (Instead of %USERNAME%), H drive showed up quickly.