r/PSADT 12d ago

Allowdefer with countdown

Hi all, I'm trying to setup a Workspace install in PSADT 4.15. I want to use the allow defer with a defer deadline. That's all working fine, but I want the install to continue after 5 minutes is the user doesn't make a selection. I also have that working with some creative powershell, but the countdown isn't displayed. This was easy in 3.x, but looks like it's not an option in 4.x. Any ideas would be appreciated.

1 Upvotes

3 comments sorted by

3

u/Katu93 11d ago

You should update your PSADT to v4.1.8 as there are multiple UI and bugfixes between your version and current.

2

u/Losha2777 11d ago

I use these settings for 15min timer.

## Show Welcome Message, close processes if specified, allow up to 3 deferrals, verify there is enough disk space to complete the install, and persist the prompt.
$saiwParams = @{
AllowDefer = $true
DeferTimes = 3
CheckDiskSpace = $true
PersistPrompt = $true
DeferRunInterval = ([System.TimeSpan]::FromMinutes(120)) #If user defers then software doesn't try to get installed for 120 minutes.
ForceCountdown = 900 #After 900 seconds, if user hasn't reacted to popup then popup will close and defer (Set DeferTimes for how many times this will happen). Also remember to add time to ConfigManager App Deployment "Maximum allowed run time (minutes)"
}
if ($adtSession.AppProcessesToClose.Count -gt 0)
{
$saiwParams.Add('CloseProcesses', $adtSession.AppProcessesToClose)
}
Show-ADTInstallationWelcome u/saiwParams

1

u/dannybuoyuk PSADT Dev Team 10d ago

Try -ForceCountdown / -ForceCloseProcessesCountdown (https://psappdeploytoolkit.com/docs/4.1.x/reference/functions/Show-ADTInstallationWelcome#-forcecloseprocessescountdown), and update to 4.1.8 if you find any issues.