Skip to main content

Downloading

Downloading PSAppDeployToolkit

PSAppDeployToolkit is provided as a self-contained Zip file archive, which contains the logic-engine and supporting PSFunctions for you to leverage, as well as a standardized deployment template. You can paste the following PowerShell code into a PowerShell console window to automatically download and extract the latest version of PSAppDeployToolkit to your user profile's Downloads folder.

## Download the latest release of PSAppDeployToolkit from GitHub
$githubRepository = "psappdeploytoolkit/psappdeploytoolkit"
$filenamePatternMatch = "PSAppDeployToolkit*.zip"
$psadtReleaseUri = "https://api.github.com/repos/$githubRepository/releases/latest"
$psadtDownloadUri = ((Invoke-RestMethod -Method GET -Uri $psadtReleaseUri).assets | Where-Object name -like $filenamePatternMatch ).browser_download_url
$zipExtractionPath = Join-Path $env:USERPROFILE "Downloads" "PSAppDeployToolkit"
$zipTempDownloadPath = Join-Path -Path $([System.IO.Path]::GetTempPath()) -ChildPath $(Split-Path -Path $psadtDownloadUri -Leaf)

## Download to a temporary folder
Invoke-WebRequest -Uri $psadtDownloadUri -Out $zipTempDownloadPath
## Remove any Zone.Identifier alternate data streams to unblock the file (if required)
Unblock-File -Path $zipTempDownloadPath
## Extract the contents of the zip file to a subfolder under the current user's Downloads folder
Expand-Archive -Path $zipTempDownloadPath -DestinationPath $zipExtractionPath -Force

Write-Host ("File: {0} extracted to Path: {1}" -f $psadtDownloadUri, $zipExtractionPath) -ForegroundColor Yellow

Alternatively, you can download and extract yourself from here:

Once extracted, you will see a file and folder structure similar to the one outlined on the next page.

Why is PSAppDeployToolkit not a PowerShell module?

PSAppDeployToolkit is not a PowerShell module, and this was a very deliberate decision made early on. For a number of reasons, we wanted to avoid the need to install PSAppDeployToolkit on the target system. :

  • PSAppDeployToolkit is a PowerShell-based logic engine that is used to drive application deployments en-masse in an enterprise environment.
  • PowerShell modules are installed on the endpoint and can be scoped to the Current User or Local Machine, either for Windows PowerShell or PowerShell Core.

If PSAppDeployToolkit was decoupled from the deployment script and instead, installed & updated as a module we would immediately run into a number of issues:

  • Before deploying any application in a production environment, you should always test against a handful of endpoints, fix any issues encountered and repeat the process until the deployment script has been thoroughly tested to ensure no bugs, typos etc. Most large environments require a Change Management process to be followed with testing and validation results.
  • A change in PSADT module version, either automated or manually initiated, would invalidate testing of any previous software deployment script.
  • The version of the PSADT module installed on the endpoint might not be the same as the version used to create and test the deployment package. This means your testing is unlikely to be 100% reliably against what is actually deployed in your environment.
  • Depending on how the module was deployed and whether it is currently in-use, the standard Remove-Module and Update-Module commands can fail.
  • A change in module version would introduce the requirement of ensuring all PSFunction and Parameter names, as well as their expect output did not change between versions, tying our hands for certain types of easy enhancements and fixes.

For these reasons, we recommend that you use the PSAppDeployToolkit standalone package provided on GitHub, and not rely on the module that is currently listed on the PowerShell Gallery.