Intune (Proactive) Remediations wrapped in PSADT...?

Wondering if anyone has yet created a pair of Intune Remediation scripts where the detection script builds a customised PSADT Deploy-Application.ps1 script and the remediation script then executes the newly customosed Deploy-Application.ps1 script ?

Background: We have a number of HP EliteBook laptops and currently use the HP CMSL ( to detect if there are newer drivers and firmware.
If there are updated drivers or firmware it installs them via the remediation script, however, the users experience of this can be a little ‘lumpy’ so I’d like to build a PSADT wrapper so that users get a better experience (better messaging) when certain drivers are installed (specifically Network drivers due to brief network loss during install, Graphics drivers due to screen flickering during install etc).

I’m thinking of a template PSADT and then customise the Deploy-Application.ps1 with content based on what is discovered during the remediation detection script run.
If anyone has any tips they can share I’d be grateful.

N.B. I did look into using Windows Driver Update Management (Learn about Windows Driver updates policy for Windows 10 Windows 11 devices in Intune | Microsoft Learn), so we could simply let drivers install seamlessly as part of Windows Update, but we simply don’t like the way it works, lack of detail that is supplied about the drivers and what feel like a lack of overall control, so feel this is a backward step from HP CMSL as we would loose control over what we can choose to deploy (or choose to block).

How would the remediation script locate the rest of the PSADT files?

We already deploy a copy of the PSADT (via an Intunewin file) into a specific C:\ProgramData\ directory onto each device, this contains ‘templated’ Deploy-Application.ps1 & AppDeployToolkitConfig.xml files that can be reused. This folder can then be copied and reused for any scripts we want to be a bit more informative to our users.

N.B. I have already done this for a Laptop restart nag remediation, which uses the PSADT Get-PendingReboot function and then differentiates between a Windows Update restart required, System restart required (e.g. Firmware update), or machine which has not been restarted for more than 5 days. Where a restart is required it will give users until the end of the day (11:30pm) to restart their machine (no deferrals) or else it will force a restart, Users can minimise the prompt until 1 hour before the deadline #1, this has been useful to get users to actually restart their devices after Windows Updates have been applied :stuck_out_tongue_winking_eye:
If the machine has been running for 5 days or more they can defer the restart upto 3 times, but the longer it has been running the less deferrals they get.
The detection script did get quite complicated (maybe overly complicated) and extended to 470 lines, it does a search and replace of certain content in the templated Deploy-Application.ps1 and AppDeployToolkitConfig.xml files.
Once the templated files are written and the detection script has completed i.e. via an exit 1 statement, the remediation script runs which executes the newly customised Deploy-Application.ps1.

& "$($PSADTKPath)\ServiceUI.exe" -process:explorer.exe C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe " -NoProfile -WindowStyle Hidden -ExecutionPolicy Bypass -File $($PSADTKPath)\Deploy-Application.ps1"

I’m hoping to do the same with the drivers and firmware update scripts that utilise the HP CMSL

#1 I think there might be a bug in the current PSADT (v3.9.3) when using the minimise until an hour before the deadline - the minimise function works fine unless the user locks and then unlocks their machine (Windows 10 22H2), if they do this it results in the countdown message being left running on the screen but with the minimise button greyed out permanently (until the deadline) - this should only be the behaviour for the last hour.
I put up with this annoyance (as it still nags our users enough to restart their machines :laughing:), but it would be great if the developers can fix this issue in a future release.

The developers won’t know of the bug unless you report it here; Issues · PSAppDeployToolkit/PSAppDeployToolkit (

I did a quick check to see if your bug is already listed.
It’s not listed but a lot of changes, code clean-up and fixes are coming in 3.9.4.
They’ve been busy in the last 5 days like their hair is on fire.

I recommend you test for your bug when 3.9.4 comes out and report the issue then.

1 Like