Lets say you want to install a bigger application, like the Microsoft Office suite. But because it is a big and heavy package, you want to give your users the ability to defer the installation. Maybe you are upgrading from an older Office version, and the user needs to use outlook for the day.

One of the ways we can do this, is by using defer with the PowerShell App Deployment Toolkit (PSADT)

How do you defer with PSADT?

To be able to defer an installation with PSADT, you need to use the Show-InstallationWelcome  function. But this does not defer installation by it self.

There are two parameters with can use with Show-InstallationWelcome  in order to defer install, those are:

-AllowDefer

This will give the user a popup with the choice to defer the install, every time the script is executed.

-AllowDeferCloseApps

This will give the user a popup with the choice to defer the install, but ONLY if the processes with the parameters -CloseApps  are running. If they are not, it will ignore the defer and continue

Decide for how long to defer

Now we know how to defer, we need to find our, for how long. There are three methods. By x number of times the script is executed, by x days from first run, or by setting a deadline using a date.

Those Parameters are as following

  • -DeferTimes
  • -DeferDays
  • -DeferDeadline
-DeferTimes  and -DeferDays  are with set with a INT value, eg 3. where the -DeferDate  is set by entering a date.

Show-InstallationWelcome examples

Lets say we want to allow the user to defer the installation for up to 3 times, then we would use this

Show-InstallationWelcome -AllowDefer -DeferTimes 3

And that would look like this

psadtallowdeferdefertimes3

 

In this example we want to defer 3 time again, but this time we do only want to do that, if Internet Explorer is running on the device.

Show-InstallationWelcome -AllowDeferCloseApps -DeferTimes 3 -CloseApps "iexplore"

And that would look like this

psadtallowdeferdefertimes3closeapps

 

In the last example we want to allow the user to defer the installation for up to 5 days.

Show-InstallationWelcome -AllowDefer -DeferDays 5

And that would look like this

psadtallowdeferdeferdays5

 

I hope this article helped you to understand the Show-InstallationWelcome  and how to defer installations using the PowerShell App Deployment Toolkit.

Feel free to leave a comment below, and share how you use defer.

 

As a last thing i would like to share the full help information on Show-InstallationWelcome