MSEndpointMgr / IntuneWin32App

Provides a set of functions to manage all aspects of Win32 apps in Microsoft Intune.
MIT License
340 stars 88 forks source link

Add Support for Using Network Shares for Application Sources #17

Open amorrowbellarmine opened 3 years ago

amorrowbellarmine commented 3 years ago

Would it be possible to rework the module to support network shares? I'm in a transition period of using both SCCM and Intune to push software to computers. I wrote PowerShell scripts several years ago to automatically download and deploy software in SCCM. Adding the ability to also deploy in Intune only requires an additional 6 lines of code using this module, but I can't reference the network share where I download the software installers to.

As a workaround I've commented out the FilePath parameter's "validatepattern" check and everything still appears to work.

This is what I am commenting out. It is used within several functions.

[ValidatePattern("^[A-Za-z]{1}:\\\w+")]
TheQuiz03 commented 1 year ago

In the [ValidatePattern] line in multiple scripts, I have found that you can prepend ^\\\\([a-zA-Z0-9_\-.$]+)\\([a-zA-Z0-9_\-.$]+)| to allow UNC paths.

Example: Before: [ValidatePattern("^[A-Za-z]{1}:\\\w+\\\w+")]

After: [ValidatePattern("^\\\\([a-zA-Z0-9_\-.$]+)\\([a-zA-Z0-9_\-.$]+)|^[A-Za-z]{1}:\\\w+\\\w+")]