MSEndpointMgr / IntuneWin32App

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

New-IntuneWin32AppRequirementRule not setting MinimumFreeDiskSpaceInMB #59

Closed emipa606 closed 1 year ago

emipa606 commented 1 year ago

When adding a requirementRule that has a MinimumFreeDiskSpaceInMB it seems that the size is never written to the app, at least not in my tests.

Example code I'm using where $applicationObject is a json-blob with application metadata with the SizeMB set to 99.6:

$sizeInMB = [math]::round($applicationObject.GeneratedValues.SizeMB * 1.5)
requirementRule = New-IntuneWin32AppRequirementRule -Architecture All -MinimumSupportedWindowsRelease 1909 -MinimumFreeDiskSpaceInMB $sizeInMB
...
Add-IntuneWin32App -FilePath $publishFile -DisplayName $appName -Description $appDescription -Publisher $appManufacturer -InstallExperience $installExperience -RestartBehavior "suppress" -DetectionRule $detectionRule -RequirementRule $requirementRule -AppVersion $newVersion -InstallCommandLine $installString -UninstallCommandLine $uninstallString -Icon $appIcon -InformationURL $changelogLink -Verbose:$VerbosePreference | Out-Null

The command is executed with no errors and Architecture and MinimumSupportedWindowsRelease is set accordingly but the size is still unset after publishing the application. Ive also tried to cast the $sizeInMB to int before using it with no change in result.

Would appreciate any input on this.

g3rhard commented 1 year ago

I can confirm, that issue still exist on the latest version.

PS: I already reported this bug in https://github.com/MSEndpointMgr/IntuneWin32App/issues/44, and it was solved...

NickolajA commented 1 year ago

That's obviously a bug that I didn't fix previously. I'll look into it.

NickolajA commented 1 year ago

See my comments in #49

NickolajA commented 1 year ago

Fixed in 1.4.0.