Skip to content
Draft
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
52 changes: 52 additions & 0 deletions blog/2026-07-01-psadt-4.2.0rc1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
---
title: PSADT v4.2.0 RC1 is now available!
authors: [dangough]
tags: [psappdeploytoolkit, powershell, release]
description: PSADT v4.2.0 RC1 contains a huge number of fixes, improvements, and features. We invite all early adopters to test it and help us to identify any potential issues before we hit GA.
---

## PSADT v4.2.0 RC1

This is the first release candidate of PSAppDeployToolkit 4.2.0! We invite all early adopters to test it and help us to identify any potential issues before we hit GA.
{/*truncate*/}

### Highlights

- Major code refactoring to clean up and optimise the code base. Everything now runs faster and the module is significantly smaller in size.
- AI and static analysis tools used to ensure code quality (CodeQL, Meziantou.Analyzer, Microsoft.CodeAnalysis.BannedApiAnalyzers, Microsoft.Extensions.StaticAnalysis, Roslynator.Analyzers).
- Pester tests updated for Pester v6 (thanks [@nohwnd!](https://github.com/nohwnd))
- iNKORE WPF library replaced by [Fluence](https://github.com/sintaxasn/Fluence.Wpf) (created and maintained by PSAppDeployToolkit founder [Dan Cunningham](https://github.com/sintaxasn)).
- [Show-ADTInstallationPrompt](../reference/functions/Show-ADTInstallationPrompt) now supports secured text inputs and dropdown selection boxes.
- [Show-ADTInstallationRestartPrompt](../reference/functions/Show-ADTInstallationRestartPrompt) now supports a cancel button.
- You can now configure a different accent color for dark mode.
- Dialogs now fallback to default image if the specified asset is not found, also images can be encoded as Base64 strings instead of supplying file paths.
- Tray notification icon shown whenever balloon tips / toasts are invoked.
- UIAccess to allow the UI to overlay the Autopilot setup screen.
- Ability to test if user is in focus mode.
- A more streamlined default `Invoke-AppDeployToolkit.ps1` template.
- [New-ADTTemplate](../reference/functions/New-ADTTemplate) now allows you to generate an entire deployment package in a single command by specifying session properties, config, assets, files, and script blocks.
- Functions added to add/remove fonts.
- Copy-ADTContentToCache now applies administrator permissions to the shared cache and has a separate cache location for non-admins.
- Descriptions for all known MSI error codes now included in logging output.
- All WMI dependencies removed, so the toolkit can run on devices with WMI corruption.
- Ability to run custom functions whenever writing to the log or when a deployment is deferred via [Add-ADTModuleCallback](../reference/functions/Add-ADTModuleCallback).
- All time-based parameters now accept TimeSpan objects as well as interpreting integers as seconds.
- `-WhatIf` support added throughout to test changes non-destructively.

For the full list of changes, see the [release notes](/docs/getting-started/release-notes) and [upgrade guidance](/docs/getting-started/upgrade-guidance-v41-to-v42) pages.

### Download

Either download from GitHub: [PSAppDeployToolkit v4.2.0 RC1](https://github.com/psappdeploytoolkit/psappdeploytoolkit/releases/tag/4.2.0-rc1)

Or install the pre-release from the PowerShell Gallery:

```powershell
Install-Module -Name PSAppDeployToolkit -Scope CurrentUser -AllowPreRelease
```

If this produces an error that the `-AllowPreRelease` parameter is not recognized, then first update **PowerShellGet** and then restart your PowerShell console:

```powershell
Install-Module PowerShellGet -Force -Scope CurrentUser
```
10 changes: 10 additions & 0 deletions blog/authors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,13 @@ mmashwani:
page: true
socials:
github: mmashwani

dangough:
name: Dan Gough
title: PSAppDeployToolkit Developer
image_url: https://gravatar.com/userimage/26791919/fdd6ec3a3e1eaff78deb15781aba4665.jpeg?&size=256
page: true
socials:
x: packageologist
linkedin: danielgough
github: dangough
32 changes: 7 additions & 25 deletions docs/deployment-concepts/deployment-structure.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ PSAppDeployToolkit v4.1 represents a significant architectural evolution from pr

#### Core Architecture Principles

**Session-Based Management**: PSADT v4.1 **introduces the `ADTSession` object**, which encapsulates all deployment state, configuration, and context. This object-oriented approach provides better isolation, state management, and extensibility compared to the global variable approach used in v3.
**Session-Based Management**: PSADT v4 **introduces the `ADTSession` object**, which encapsulates all deployment state, configuration, and context. This object-oriented approach provides better isolation, state management, and extensibility compared to the global variable approach used in v3.

**Security-First Design**: The v4.1 architecture **separates user interaction from system-level operations**, eliminating the need for ServiceUI and providing a more secure deployment experience. User interfaces run in the user's session context, while system operations execute in the appropriate security context.
**Security-First Design**: The v4.1+ architecture **separates user interaction from system-level operations**, eliminating the need for ServiceUI and providing a more secure deployment experience. User interfaces run in the user's session context, while system operations execute in the appropriate security context.

**Modular Function Library**: The toolkit provides **130+ specialized functions** organized into logical categories (Installation, Registry, File System, User Interface, etc.), each designed for specific deployment scenarios.
**Modular Function Library**: The toolkit provides **140+ specialized functions** organized into logical categories (Installation, Registry, File System, User Interface, etc.), each designed for specific deployment scenarios.

## V4 Native Deployment Template

The **v4 native deployment template** is designed to be more modular, flexible, and user-friendly than the v3 structure, while still containing all core PSADT module files. This structure represents the recommended approach for new deployments and provides the full feature set of PSADT v4.1.
The **v4 native deployment template** is designed to be more modular, flexible, and user-friendly than the v3 structure, while still containing all core PSADT module files. This structure represents the recommended approach for new deployments and provides the full feature set of PSADT v4.2.

:::info
The **v4 native deployment template** structure is considerably more sophisticated than the V3 deployment structure. At first glance, it can seem overly complex and daunting. However, you can avoid getting overwhelmed by focusing on just the files you need to know about.
Expand Down Expand Up @@ -88,9 +88,9 @@ The root directory serves as the deployment entry point and contains the essenti

#### PSAppDeployToolkit Directory

This directory contains the complete PSADT v4.1 framework and should never be modified:
This directory contains the complete PSADT module and should never be modified:

- **Core Module Files**: The main PSADT PowerShell module with over 200 specialized functions
- **Core Module Files**: The main PSADT PowerShell module with over 140 specialized functions
- **UI Components**: Both Classic and Fluent UI frameworks for user interaction
- **Security Components**: Session management, privilege handling, and security context management
- **Function Libraries**: Organized collections of functions for installation, registry, file system, and UI operations
Expand All @@ -100,7 +100,7 @@ This directory contains the complete PSADT v4.1 framework and should never be mo

The primary location for application installation media:

- **Supported File Types**:
- **Example File Types**:
- Executable installers (`.exe`, `.msi`, `.msm`)
- Windows Installer patches (`.msp`)
- Transform files (`.mst`)
Expand Down Expand Up @@ -187,24 +187,6 @@ YourApp-Deployment/
└── strings.psd1
```

#### Example Multi-Architecture Deployment Structure

For applications with multiple versions or architectures:

```text
YourApp-Deployment/
├── Files/
│ ├── x64/
│ │ ├── YourApp-x64-Setup.exe
│ │ └── YourApp-x64-Patch.msp
│ ├── x86/
│ │ ├── YourApp-x86-Setup.exe
│ │ └── YourApp-x86-Patch.msp
│ └── Common/
│ ├── SharedComponents.msi
│ └── License.lic
```

:::info
The PSADT v4 compatibility deployment template structure is considerably more sophisticated than the V3 deployment structure. At first glance, it can seem overly complex and daunting. However, you can avoid getting overwhelmed by focusing on just the files you need to know about.
:::
Expand Down
50 changes: 14 additions & 36 deletions docs/deployment-concepts/invoke-appdeploytoolkit.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -29,49 +29,27 @@ The heart of PSADT v4 is the `ADTSession` object, which encapsulates all deploym

These are the first thing to edit in your deployment script and are stored within the `ADTSession` object, providing better encapsulation and state management compared to global variables in v3. Session Properties define your application's metadata, behavior, and deployment requirements.

| Property | Example | Description |
| :-------------------- | :--------------------------------------------------------- | :------------------------------------------------------------------------------------ |
| `AppVendor` | `Microsoft` | The vendor name of the application |
| `AppName` | `Office 365` | The name of the application |
| `AppVersion` | `16.0` | The version of the application |
| `AppArch` | `x64` | The architecture of the application (x86 or x64) |
| `AppLang` | `EN` | The language of the application |
| `AppRevision` | `01` | The revision of the application package |
| `AppSuccessExitCodes` | `@(0)` | Exit codes that indicate success |
| `AppRebootExitCodes` | `@(1641, 3010)` | Exit codes that indicate a reboot is required |
| `AppProcessesToClose` | `@(@{ Name = 'winword'; Description = 'Microsoft Word' })` | **New in v4.1**. Processes that should be closed before install / uninstall / repair. |
| `RequireAdmin` | `$true` | **New in v4.1**. Whether the script requires administrative privileges |
| Property | Example | Description |
| :-------------------- | :--------------------------------------------------------- | :------------------------------------------------------------------- |
| `AppVendor` | `Microsoft` | The vendor name of the application |
| `AppName` | `Office 365` | The name of the application |
| `AppVersion` | `16.0` | The version of the application |
| `AppArch` | `x64` | The architecture of the application (x86 or x64) |
| `AppRevision` | `01` | The revision of the application package |
| `AppSuccessExitCodes` | `@(0)` | Exit codes that indicate success |
| `AppRebootExitCodes` | `@(1641, 3010)` | Exit codes that indicate a reboot is required |
| `AppProcessesToClose` | `@(@{ Name = 'winword'; Description = 'Microsoft Word' })` | Processes that should be closed before install / uninstall / repair. |

:::warning[PSAppDeployToolkit variables]
If trying to use a PSAppDeployToolkit variables such as $envProgramFiles in this section, it will not work because the module has typically not been imported and initialized this early on in the script.
If trying to use a PSAppDeployToolkit variables such as $envProgramFiles in this section, they will not work because the module has typically not been imported and initialized this early on in the script.
:::

:::warning[Breaking Changes in v4.1]
If you are upgrading from v4.0 or earlier, you must move any `RequireAdmin` setting from your config file to the session object in your deployment script, and use `AppProcessesToClose` instead of specifying the processes directly on the `-CloseProcesses` parameter of `Show-ADTInstallationWelcome`.
:::

:::info[New in v4.1: RequireAdmin]
PSADT v4.1 contains a new variable `RequireAdmin` that allows you to check for administrative privileges on a per-application basis without needing to modify the PSADT configuration file.

- `RequireAdmin = $true`, will fail the deployment if administrative privileges are not available.
- `RequireAdmin = $false`, will not check for administrative privileges.

Note that `Invoke-AppDeployToolkit.exe` no longer checks this value to figure out if it needs to relaunch itself elevated. If your deployment requires administrative privileges, you must ensure that the launcher is run elevated.
:::

:::info[New in v4.1: AppProcessesToClose]
PSADT v4.1 contains a new variable `AppProcessesToClose` that allows you to specify processes to be closed before the installation, uninstallation, or repair phases. This replaces the previous method of using the -CloseApps parameter on `Show-InstallationWelcome`

- `AppProcessesToClose = <populated>`, will automatically close the specified processes before proceeding with the deployment.
:::

:::info
Use hashtable objects on `AppProcessesToClose` with `Name` and `Description` properties for better user experience.

:::info[AppProcessesToClose]
`AppProcessesToClose` allows you to specify processes to be closed before the installation, uninstallation, or repair phases. You can either supply just process names (without the .exe extension), or use the hashtable format to override the default description for the process.
```PowerShell
AppProcessesToClose = @(@{ Name = 'winword'; Description = 'Microsoft Word' })
```

Default behaviour when `DeployMode` is `Auto` is that the deployment will only be interactive if one or more of these processes are running.
:::

### Deployment Types & Phases
Expand Down
11 changes: 6 additions & 5 deletions docs/deployment-concepts/zero-config-deployment.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@ Now that you understand the basics of how a deployment works, you can try a simp

To use this feature:

1. Ensure the `AppName` is left empty in `Invoke-AppDeployToolkit.ps1` to activate zero-config mode.
2. Place your MSI file into the `Files` folder of the PSAppDeployToolkit deployment template. This method only supports the installation of one MSI, so if more than one MSI is found, then only the first one is selected.
3. If you have an MST file, then also place this into the `Files` folder. The MST file must have the same name as the MSI file. For example, if your MSI file name is `test01.msi`, then the MST file must be named `test01.mst`.
4. If you have any MSP files, then also place them into the `Files` folder. You can place more than one MSP file in the folder, but you must name the files in alphabetical order to control the order in which they are installed.
5. You can also compress all of these files along with any other installation content required into a WIM file, and it will be automatically mounted and used.
1. Ensure you are using the **ZeroConfig** variant of the template (see [Creating a new deployment](/docs/getting-started/creating-a-new-deployment))
2. Ensure the `AppName` is left empty in `Invoke-AppDeployToolkit.ps1` to activate zero-config mode.
3. Place your MSI file into the `Files` folder of the PSAppDeployToolkit deployment template. This method only supports the installation of one MSI, so if more than one MSI is found, then only the first one is selected.
4. If you have an MST file, then also place this into the `Files` folder. The MST file must have the same name as the MSI file. For example, if your MSI file name is `test01.msi`, then the MST file must be named `test01.mst`.
5. If you have any MSP files, then also place them into the `Files` folder. You can place more than one MSP file in the folder, but you must name the files in alphabetical order to control the order in which they are installed.
6. You can also compress all of these files along with any other installation content required into a WIM file, and it will be automatically mounted and used.
9 changes: 8 additions & 1 deletion docs/getting-started/creating-a-new-deployment.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,22 @@ To create a new deployment using the PSADT v4 native deployment template, run:
New-ADTTemplate -Destination C:\Temp -Name "PSAppDeployToolkitv4"
```

To create a new deployment using the PSADT v4 native deployment template with [Zero Config](../deployment-concepts/zero-config-deployment.mdx) support, run:

```powershell
New-ADTTemplate -Destination C:\Temp -Name "PSAppDeployToolkitv4_ZeroConfig" -ZeroConfig
```

### Using the downloadable templates

The PSAppDeployToolkit GitHub Releases page includes several templates for creating a new deployment.

- `PSAppDeployToolkit_Template_v4.zip` - PSADT v4 native deployment template
- `PSAppDeployToolkit_Template_v4_ZeroConfig.zip` - PSADT v4 native deployment template with [Zero Config](../deployment-concepts/zero-config-deployment.mdx) support
- `PSAppDeployToolkit_Template_v3.zip` - PSADT v3 compatible deployment template

To create a new deployment using the templates, follow these steps:

1. Download the PSAppDeployToolkit template you require from the [PSAppDeployToolkit GitHub Releases page](https://github.com/PSAppDeployToolkit/PSAppDeployToolkit/releases/latest).
1. Download the PSAppDeployToolkit template you require from the [PSAppDeployToolkit GitHub Releases page](https://github.com/PSAppDeployToolkit/PSAppDeployToolkit/releases).
2. Extract the contents to a folder on your computer.
3. Open the folder and review the contents. We will discuss the contents in the next section.
Loading
Loading