Steps: Files Manager → Session Config → Parameters → Install Phase → Uninstall Phase → Repair Phase → Preview
Step 1 — Files Manager #
Upload the installer files that your deployment script will reference.
How to upload:
- Drag and drop files or folders onto the upload area, or
- Click the upload area to open the file browser
Features:
- Folder structure is preserved (useful for complex installers)
- Maximum upload size: 5 GB per request
- Automatic metadata detection: When you upload an MSI or EXE, the wizard reads its
embedded ProductName, ProductVersion, and architecture and offers to pre-fill Session
Configuration
File Tree:
- View all uploaded files in a tree structure
- Delete individual files or folders
- Clear all files for the active package
Uploaded files are stored per-package in
%AppData%\XOAP\PackageWizard\workspace\Files\{packageId}\ and are bundled into Files/
inside the exported zip.
Step 2 — Session Configuration #
Configure the application metadata that PSADT uses for logging, UI display, and detection.
Every field here is written into the $adtSession = @{ ... } block of the generated script.
Application Information #
| Field | Description | Example |
|---|---|---|
| App Vendor | Software publisher | Microsoft |
| App Name | Application name | Visual Studio Code |
| App Version | Version string | 1.85.0 |
| App Architecture | Target architecture | x64 |
| App Language | Language code | EN |
| App Revision | Package revision number | 01 |
Script Metadata #
| Field | Description | Example |
|---|---|---|
| App Script Version | Your script’s internal version | 4.0.0 |
| App Script Date | Date of script creation (ISO) | 2026-04-22 |
| App Script Author | Who wrote the script (defaults to preference) | Admin |
Deployment Settings #
| Field | Description | Example |
|---|---|---|
| Require Admin | Tri-state: Not Defined / True / False. "Not Defined" preserves the toolkit’s own value | True |
| Success Exit Codes | List of integers that mean success | 0 |
| Reboot Exit Codes | List of integers that require a reboot | 1641, 3010 |
| App Processes to Close | List of process names to close before install | code, code-insiders |
Display Settings #
| Field | Description |
|---|---|
| Install Name | Override the display name used by PSADT during install |
| Install Title | Override the title bar text shown to users |
Step 3 — Parameters #
Add custom PowerShell parameters to your deployment script. These are appended to the param()
block alongside the default PSADT parameters.
Default parameters (always present, read-only):
DeploymentType—Install/Uninstall/RepairDeployMode—Auto/Interactive/NonInteractive/SilentSuppressRebootPassThru(switch)TerminalServerMode(switch)DisableLogging(switch)
For each custom parameter you can set:
| Field | Description |
|---|---|
| Name | Parameter name (e.g., ConfigFile) |
| Type | System.String, System.Boolean, System.Int32, System.Management.Automation.SwitchParameter, etc. |
| Mandatory | Whether the parameter is required |
| ValidateSet | Comma-separated list of allowed values (renders as [ValidateSet('A','B','C')]) |
| Default Value | Value used when the parameter is not specified |
| Description | Help text rendered as a # comment above the parameter |
Example use case: Add -Environment with ValidateSet = Dev,Staging,Production to control
which configuration file a caller deploys.
Step 4 — Install Phase #
Write the PowerShell code that runs when DeploymentType = Install. The phase is split into
three Monaco code editors:
| Section | When It Runs | Typical Use |
|---|---|---|
| Pre-Installation | Before the main install | Close running apps, back up settings, check prerequisites |
| Installation | Main install logic | Run MSI/EXE installer, copy files, set registry keys |
| Post-Installation | After the main install | Create shortcuts, configure settings, clean up temp files |
Editor features:
- Full PowerShell syntax highlighting (Monaco Editor)
- Cmdlet autocomplete — start typing any PSADT v4 cmdlet name and the editor suggests it,
including a snippet with required parameters. Type-after a known cmdlet to get parameter
suggestions with their types, required flag, description, and valid values. - Function Builder button — opens a modal to pick a cmdlet, fill in its parameters via
form fields (with a file picker populated from your uploaded files), and insert the generated
code at the cursor. See Function Builder & Cmdlet Autocomplete. - Maximize — each editor has a full-screen toggle
- Clear — wipe the section’s content
Example installation code:
## Install the MSI
Start-ADTMsiProcess -FilePath 'MyApp.msi' -Action Install
## Copy configuration file
Copy-ADTFile -Path "$($adtSession.DirFiles)\config.xml" -Destination "$envProgramFiles\MyApp\"
Step 5 — Uninstall Phase #
Same three-section structure (Pre, Main, Post) as the Install Phase. Runs when
DeploymentType = Uninstall.
Example:
## Remove the MSI
Uninstall-ADTApplication -Name 'MyApp' -FilterScript { $_.Publisher -eq 'Contoso' }
## Clean up leftover files
Remove-Item -Path "$envProgramFiles\MyApp\config.xml" -Force -ErrorAction SilentlyContinue
Step 6 — Repair Phase #
Same three-section structure. Runs when DeploymentType = Repair. Many packages leave the
repair phase empty — that’s fine; PSADT simply runs an empty function.