Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support auto update settings for Intune Win32 app assignment #167

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions Public/Add-IntuneWin32AppAssignmentAllDevices.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ function Add-IntuneWin32AppAssignmentAllDevices {
.PARAMETER DeliveryOptimizationPriority
Specify to download content in the background using default value of 'notConfigured', or set to download in foreground using 'foreground'.

.PARAMETER AutoUpdateSupersededApps
Specify to automatically update superseded app using default value of 'notConfigured'.

.PARAMETER EnableRestartGracePeriod
Specify whether Restart Grace Period functionality for this assignment should be configured, additional parameter input using at least RestartGracePeriod and RestartCountDownDisplay is required.

Expand Down Expand Up @@ -90,6 +93,11 @@ function Add-IntuneWin32AppAssignmentAllDevices {
[ValidateSet("notConfigured", "foreground")]
[string]$DeliveryOptimizationPriority = "notConfigured",

[parameter(Mandatory = $false, HelpMessage = "Specify to automatically update superseded app using default value of 'notConfigured'.")]
[ValidateNotNullOrEmpty()]
[ValidateSet("notConfigured", "enabled", "unknownFutureValue")]
[string]$AutoUpdateSupersededApps = "notConfigured",

[parameter(Mandatory = $false, HelpMessage = "Specify whether Restart Grace Period functionality for this assignment should be configured, additional parameter input using at least RestartGracePeriod and RestartCountDownDisplay is required.")]
[ValidateNotNullOrEmpty()]
[bool]$EnableRestartGracePeriod = $false,
Expand Down Expand Up @@ -206,12 +214,17 @@ function Add-IntuneWin32AppAssignmentAllDevices {
"source" = "direct"
"target" = $TargetAssignment
}
# Construct table for autoUpdate settings
$AutoUpdateSettings = @{
"autoUpdateSupersededApps" = $AutoUpdateSupersededApps
}
$SettingsTable = @{
"@odata.type" = "#microsoft.graph.win32LobAppAssignmentSettings"
"notifications" = $Notification
"restartSettings" = $null
"deliveryOptimizationPriority" = $DeliveryOptimizationPriority
"installTimeSettings" = $null
"autoUpdateSettings" = $AutoUpdateSettings
}
$Win32AppAssignmentBody.Add("settings", $SettingsTable)

Expand Down
13 changes: 13 additions & 0 deletions Public/Add-IntuneWin32AppAssignmentAllUsers.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ function Add-IntuneWin32AppAssignmentAllUsers {
.PARAMETER DeliveryOptimizationPriority
Specify to download content in the background using default value of 'notConfigured', or set to download in foreground using 'foreground'.

.PARAMETER AutoUpdateSupersededApps
Specify to automatically update superseded app using default value of 'notConfigured'.

.PARAMETER EnableRestartGracePeriod
Specify whether Restart Grace Period functionality for this assignment should be configured, additional parameter input using at least RestartGracePeriod and RestartCountDownDisplay is required.

Expand Down Expand Up @@ -90,6 +93,11 @@ function Add-IntuneWin32AppAssignmentAllUsers {
[ValidateSet("notConfigured", "foreground")]
[string]$DeliveryOptimizationPriority = "notConfigured",

[parameter(Mandatory = $false, HelpMessage = "Specify to automatically update superseded app using default value of 'notConfigured'.")]
[ValidateNotNullOrEmpty()]
[ValidateSet("notConfigured", "enabled", "unknownFutureValue")]
[string]$AutoUpdateSupersededApps = "notConfigured",

[parameter(Mandatory = $false, HelpMessage = "Specify whether Restart Grace Period functionality for this assignment should be configured, additional parameter input using at least RestartGracePeriod and RestartCountDownDisplay is required.")]
[ValidateNotNullOrEmpty()]
[bool]$EnableRestartGracePeriod = $false,
Expand Down Expand Up @@ -206,12 +214,17 @@ function Add-IntuneWin32AppAssignmentAllUsers {
"source" = "direct"
"target" = $TargetAssignment
}
# Construct table for autoUpdate settings
$AutoUpdateSettings = @{
"autoUpdateSupersededApps" = $AutoUpdateSupersededApps
}
$SettingsTable = @{
"@odata.type" = "#microsoft.graph.win32LobAppAssignmentSettings"
"notifications" = $Notification
"restartSettings" = $null
"deliveryOptimizationPriority" = $DeliveryOptimizationPriority
"installTimeSettings" = $null
"autoUpdateSettings" = $AutoUpdateSettings
}
$Win32AppAssignmentBody.Add("settings", $SettingsTable)

Expand Down
13 changes: 13 additions & 0 deletions Public/Add-IntuneWin32AppAssignmentGroup.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ function Add-IntuneWin32AppAssignmentGroup {
.PARAMETER DeliveryOptimizationPriority
Specify to download content in the background using default value of 'notConfigured', or set to download in foreground using 'foreground'.

.PARAMETER AutoUpdateSupersededApps
Specify to automatically update superseded app using default value of 'notConfigured'.

.PARAMETER EnableRestartGracePeriod
Specify whether Restart Grace Period functionality for this assignment should be configured, additional parameter input using at least RestartGracePeriod and RestartCountDownDisplay is required.

Expand Down Expand Up @@ -114,6 +117,11 @@ function Add-IntuneWin32AppAssignmentGroup {
[ValidateSet("notConfigured", "foreground")]
[string]$DeliveryOptimizationPriority = "notConfigured",

[parameter(Mandatory = $false, HelpMessage = "Specify to automatically update superseded app using default value of 'notConfigured'.")]
[ValidateNotNullOrEmpty()]
[ValidateSet("notConfigured", "enabled", "unknownFutureValue")]
[string]$AutoUpdateSupersededApps = "notConfigured",

[parameter(Mandatory = $false, ParameterSetName = "GroupInclude", HelpMessage = "Specify whether Restart Grace Period functionality for this assignment should be configured, additional parameter input using at least RestartGracePeriod and RestartCountDownDisplay is required.")]
[ValidateNotNullOrEmpty()]
[bool]$EnableRestartGracePeriod = $false,
Expand Down Expand Up @@ -256,12 +264,17 @@ function Add-IntuneWin32AppAssignmentGroup {
}
switch ($PSCmdlet.ParameterSetName) {
"GroupInclude" {
# Construct table for autoUpdate settings
$AutoUpdateSettings = @{
"autoUpdateSupersededApps" = $AutoUpdateSupersededApps
}
$SettingsTable = @{
"@odata.type" = "#microsoft.graph.win32LobAppAssignmentSettings"
"notifications" = $Notification
"restartSettings" = $null
"deliveryOptimizationPriority" = $DeliveryOptimizationPriority
"installTimeSettings" = $null
"autoUpdateSettings" = $AutoUpdateSettings
}
$Win32AppAssignmentBody.Add("settings", $SettingsTable)
}
Expand Down
3 changes: 3 additions & 0 deletions Public/Get-IntuneWin32AppAssignment.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,8 @@ function Get-IntuneWin32AppAssignment {
Notifications = $Win32AppAssignment.settings.notifications
RestartSettings = $Win32AppAssignment.settings.restartSettings
InstallTimeSettings = $Win32AppAssignment.settings.installTimeSettings
AutoUpdateSettings = $Win32AppAssignment.settings.autoUpdateSettings

}
$Win32AppAssignmentList.Add($PSObject) | Out-Null
}
Expand Down Expand Up @@ -210,6 +212,7 @@ function Get-IntuneWin32AppAssignment {
Notifications = $Win32AppAssignment.settings.notifications
RestartSettings = $Win32AppAssignment.settings.restartSettings
InstallTimeSettings = $Win32AppAssignment.settings.installTimeSettings
AutoUpdateSettings = $Win32AppAssignment.settings.autoUpdateSettings
}
$Win32AppAssignmentList.Add($PSObject) | Out-Null
}
Expand Down