Map shared folder using endpoint manager (NO AD involved)

%3CLINGO-SUB%20id%3D%22lingo-sub-2274671%22%20slang%3D%22en-US%22%3EMap%20shared%20folder%20using%20endpoint%20manager%20(NO%20AD%20involved)%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2274671%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Eso%20I%20have%20a%20couple%20of%20dozen%20users%20using%20Microsoft365%2FOffice365%20with%20Premium%20accounts.%26nbsp%3B%3C%2FP%3E%3CP%3ESo%20I%20have%20setup%20%22Endpoint%20Manager%22%20to%20control%20them%2C%20deploy%20apps...%3C%2FP%3E%3CP%3ESo%20the%20company%20does%20not%20have%20any%20kind%20of%20server%2C%20only%20laptops%2C%20using%20Office%2FTeams%2FSharepoint.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EBut%20they%20also%20have%20a%20little%20NAS%20on%20premise%20for%20some%20data%20with%202%20shared%20folders%20on%20the%20NAS.%20On%20the%20NAS%20I%20created%20local%20users%20and%20gave%20them%20the%20correct%20rights.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHow%20can%20I%20map%20a%20drive%20eg%20M%3A%20to%20the%20NAS%20using%20the%20credentials%20I%20created%20on%20the%20NAS%2C%20using%20Endpoint%20Manager%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2274671%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EIntune%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EMobile%20Device%20Management%20(MDM)%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
New Contributor

Hi,

 

so I have a couple of dozen users using Microsoft365/Office365 with Premium accounts. 

So I have setup "Endpoint Manager" to control them, deploy apps...

So the company does not have any kind of server, only laptops, using Office/Teams/Sharepoint.

 

But they also have a little NAS on premise for some data with 2 shared folders on the NAS. On the NAS I created local users and gave them the correct rights.

 

How can I map a drive eg M: to the NAS using the credentials I created on the NAS, using Endpoint Manager?

 

 

 

3 Replies
Hi, it all depends (like it always does ) on your setup

Are the devices azure ad joined or only registered ?
Are the user admin?
Are you using Applocker

Asuming you don't block PowerShell you could create a powershell script with a simple net use x: \\server\fileshare /user:domain\username *

But its not pretty of course...

Or like I did with an admx to map network drives
https://call4cloud.nl/2021/03/deliver-us-from-hybrid/

Or like this

https://2azure.blob.core.windows.net/powershellscripts/MapDrives.ps1

But it all depends if you could access the nas without password prompts the first time you are mounting a drive letter to it and how much users account are created on the nas...
Hi,

the laptops are Azure AD joined.
The users are not admins
Applocker? I don't think so

I tried once with a powershell, but it kept complaining it was not signed.
Plus if I have like 30 different users with different passwords, it would take 30 different scripts, no?

They cannot access the mapped drive without a password, because if I would do that everyone without a user/passsword would be able to access it.

I did not test this out myself but it's worth a try . the first thing I can come up with:

You will need to create a powershell script for each user (group) to add the credentials to the credential manager one time. It would take some time..

cmdkey /add:sharedmachine /user:domainname\username /pass:password

After the credentials are added you could create a networkdrive like I did with the deliver usfrom hybrid blog