question

andreasbright-4989 avatar image
1 Vote"
andreasbright-4989 asked Crystal-MSFT edited

Map network drive

Hi,

We have a local QNAP nas device in our office, and we have X: mapped to this drive with same username and password for everyone.
When we work from home, we connect with VPN and access this drive when we click on X:

We have earlier manually mapped this since we do not have any local AD.
What is the simplest way to accomplish this with intune.

Say I join a new computer, I would like the mapping script to run, but since the machine is not able to contact the QNAP device at the time of joining, I would like it not to timeout, just mount the path and don`t bother if it answers.


net use q: \\192.168.1.26\temp /user:user password

This is simple, but If I use this and the IP doesnt answer it does not map offcourse.... I just want to force that to happen.

Suggestions

Thanks for any answers

/R
Andy

mem-intune-generalmem-intune-device-configurationsmem-intune-enrollment
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Jason-MSFT avatar image
1 Vote"
Jason-MSFT answered

same username and password for everyone

I strongly suggest you discontinue this practice as it is terrible security wise for several different reasons.

There is no method in Intune to map a drive. The best you can do today is use a PowerShell script.

As for the timeout, there's no way to do this. Mapping a shared drive requires connectivity regardless of the method use to map the drive.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Crystal-MSFT avatar image
1 Vote"
Crystal-MSFT answered Crystal-MSFT edited

@andreasbright-4989, Agree with Jason, based on my testing with net use command, we can't map a net work driver without network connectivity.

Hope it can help.



If the response is helpful, please click "Accept Answer" and upvote it.
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.


5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

NickLoenders-5815 avatar image
0 Votes"
NickLoenders-5815 answered Jason-MSFT commented

but with Powershell, you need to be an admin to allow scripts....
??

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Assuming you are referring to the execution policy, sign your script and configure the execution policy to All Signed.

0 Votes 0 ·
NickLoenders-5815 avatar image
0 Votes"
NickLoenders-5815 answered Jason-MSFT commented

But it needs to be signed by an official CA or not??
or how does one do this?

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

There's no such thing as an "official CA".

This post doesn't explicitly address the question of how to sign a script, but it contains a lot of supplemental information as well as additional links to documentation on how to do this: https://techcommunity.microsoft.com/t5/intune-customer-success/adding-a-certificate-to-trusted-publishers-using-intune/ba-p/1974488

0 Votes 0 ·