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

Drive Label not Expand correctly #43

Open IntuneEnterPriseAdmin opened 1 year ago

IntuneEnterPriseAdmin commented 1 year ago

Hello,

Sometimes the Drive Label ist not correctly translated (New-Object -ComObject Shell.Application).NameSpace("$($drive.DriveLetter):").Self.Name = $drive.Label

change to

(New-Object -ComObject Shell.Application).NameSpace("$($drive.DriveLetter):").Self.Name = $ExecutionContext.InvokeCommand.ExpandString($drive.Label)

This will correct this Issue

Thank you for this very usefull generator