I am trying to use this, of course modded to suite my script and output: im using 1.5.0 of the IntuneWin32App module
Likewise with detection rules, multiple requirement rules are also supported
Here you can mix however you like
$RequirementRules = New-Object -TypeName "System.Collections.ArrayList"
$RequirementRule1 = New-IntuneWin32AppRequirementRule -Architecture $ArchitectureRequired -MinimumSupportedWindowsRelease $MinimumSupportedWindowsRelease
$RequirementRules.Add($RequirementRule1) | Out-Null
$RequirementRule2 = New-IntuneWin32AppRequirementRuleScript -StringOutputDataType -ScriptFile "$UpdateApplicablescript" -ScriptContext "system" -StringComparisonOperator "equal" -StringValue "Applicable"
$RequirementRules.Add($RequirementRule2) | Out-Null
$RequirementRules
then when i try to build the app i get:
Add-IntuneWin32App: C:\Intune\Build-intune-app.ps1:90
$Win32App = Add-IntuneWin32App @Win32AppArguments
Cannot process argument transformation on parameter 'RequirementRule'. Cannot convert the "System.Collections.ArrayList" value of type "System.Collections.ArrayList" to type "System.Collections.Specialized.OrderedDictionary".
here are my arguments
$Win32AppArguments = @{
"FilePath" = $IntuneWinFile
"DisplayName" = $DisplayName
"Description" = $Description
"Publisher" = $Publisher
"AppVersion" = $AppVersion
"InformationURL" = $InformationURL
"PrivacyURL" = $PrivacyURL
"Icon" = $Icon
"InstallCommandLine" = $InstallCommandLine
"UninstallCommandLine" = $UninstallCommandLine
"MaximumInstallationTimeInMinutes" = $InstallMaxTime
"AllowAvailableUninstall" = $true
"InstallExperience" = "system"
"RestartBehavior" = "suppress"
"DetectionRule" = $DetectionRules
"RequirementRule" = $RequirementRules
"Verbose" = $true
}
Not a big deal at the moment as it is only something i will need to use when creating an app to update a previous version. Which is done via patch my pc at the moment but would like to be able to do the same for in-house stuff too.
I am trying to use this, of course modded to suite my script and output: im using 1.5.0 of the IntuneWin32App module
Likewise with detection rules, multiple requirement rules are also supported
Here you can mix however you like
$RequirementRules = New-Object -TypeName "System.Collections.ArrayList"
$RequirementRule1 = New-IntuneWin32AppRequirementRule -Architecture $ArchitectureRequired -MinimumSupportedWindowsRelease $MinimumSupportedWindowsRelease
$RequirementRules.Add($RequirementRule1) | Out-Null
$RequirementRule2 = New-IntuneWin32AppRequirementRuleScript -StringOutputDataType -ScriptFile "$UpdateApplicablescript" -ScriptContext "system" -StringComparisonOperator "equal" -StringValue "Applicable"
$RequirementRules.Add($RequirementRule2) | Out-Null
$RequirementRules
then when i try to build the app i get:
Add-IntuneWin32App: C:\Intune\Build-intune-app.ps1:90
$Win32App = Add-IntuneWin32App @Win32AppArguments
Cannot process argument transformation on parameter 'RequirementRule'. Cannot convert the "System.Collections.ArrayList" value of type "System.Collections.ArrayList" to type "System.Collections.Specialized.OrderedDictionary".
here are my arguments
$Win32AppArguments = @{
"FilePath" = $IntuneWinFile
"DisplayName" = $DisplayName
"Description" = $Description
"Publisher" = $Publisher
"AppVersion" = $AppVersion
"InformationURL" = $InformationURL
"PrivacyURL" = $PrivacyURL
"Icon" = $Icon
"InstallCommandLine" = $InstallCommandLine
"UninstallCommandLine" = $UninstallCommandLine
"MaximumInstallationTimeInMinutes" = $InstallMaxTime
"AllowAvailableUninstall" = $true
"InstallExperience" = "system"
"RestartBehavior" = "suppress"
"DetectionRule" = $DetectionRules
"RequirementRule" = $RequirementRules
"Verbose" = $true
}
Not a big deal at the moment as it is only something i will need to use when creating an app to update a previous version. Which is done via patch my pc at the moment but would like to be able to do the same for in-house stuff too.