Hello, we started testing defer option for packages in Intune. It is not clear for us how we should proceed with defer behavior.
This is our pice of code
$saiwParams = @{
AllowDefer = $true
DeferTimes = 2
#CheckDiskSpace = $true
#PersistPrompt = $true
CloseProcesses = @{ Name = 'Adobe Acrobat DC' }, @{ Name = 'Adobe Acrobat Tray Icon' }, @{ Name = 'A3DUtility' }, @{ Name = 'AcroRd32' }, @{ Name = 'Acrobat' }, @{ Name = 'acrodist' }, @{ Name = 'AcroCEF' }, @{ Name = 'PDapp' } # optional
ForceCloseProcessesCountdown = 1800 # optional
DeferRunInterval = [TimeSpan]::FromHours(1) # interval until next prompt
NoMinimizeWindows = $true
}
# Custom exit code for deferred installation
$DeferExitCode = 60012
# Show the welcome dialog
Show-ADTInstallationWelcome @saiwParams
When user click in defer option, Intune return message: The user cancelled the app installation. (0x80070642)
When we add Return code in intune for package as 60012- Retry then the status is: Pending installation
What we should do in this case? Should we live with error like: The user cancelled the app installation. (0x80070642)? If so, then when will be the next try? I know that option DeferRunInterval it means not faster that this value, but then Intune will try for next 8h / 24h?
That part I'm not so sure.
AFAIK, Intune will retry every 8 hours after running OOBE/AutoPilot and then every 24 hours there after.
But I've never paid attention to notice this IRL.
Hi there!
Did you observe that the intune re-evaluation worked after 24hours?
If the exit code is not specified in package, after receiving 1602 it should repeat after 24 hours.
You can try to add the exit code to the intune package and set as Retry, then theoretically it should re-evaluate 3 times per 5 minutes and later on after 24 hours.
I tested it in my environment and it worked after 24 hours as expected. (I did not check the scenario with added exit code to intune package as retry - it would be frustrating for users to have a lot of notifications)
Assuming you have set the "-DeferRunInterval" to 24 hours and use the default PSADT exit code settings:
User clicks defer.
Intune receives exit code 1602 (0x80070642), which by default is a retry.
The company portal may continue to show "Installing".
After 5 minutes, it retrys the install.
PSADT automatically silently defers the installation (due to -DeferRunInterval).
Thus, another 1602 exit code, Intune should retry another time or two, after 5 minutes (each time PSADT silently deferring the intall due to -DeferRunInterval).
The next day (Intune will retry every 24 hours), Intune will try to install the app again, and if the process(es) are running, the user will then be prompted, otherwise it will be installed. (as configured in PSADT)
The point of the "-DeferRunInterval" is to prevent the end-user from being prompted multiple times, due to Intune's default retry schedule (typically 3 times per 5 minutes, as mentioned by someone else above). That's always been a complaint by end-users in my experience. Imagine deferring an app update when you're busy / locked-in, hitting defer, and then getting repromped every 5 minutes... FOR EACH APP!
Having that suppression ability built in to PSADT in some simple form seemed essential / super useful.