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

Variable on the path #14

Closed edisontea closed 4 years ago

edisontea commented 4 years ago

Hi Nicolonsky, Great work on your IntuneDriveMapping generator! We want to use your script to map drive to user's home folder. Is it possible for your script to accept a variable on the UNC path ie. - \server1\users\%username%? It doesn't seem to work, specific path works. Any suggestions? Thanks~

edisontea commented 4 years ago

Correction - \server1\users\%username%

Bubbahewitt commented 4 years ago

Same issue, "WARNING: The property 'Name' cannot be found on this object. Verify that the property exists and can be set."

nicolonsky commented 4 years ago

Simply use \\intra.tech.nicolonsky.ch\home\$env:username because it's PowerShell.