The Deploy-Application.ps1 script is the only script you need to modify to deploy your application. The Deploy-Application.ps1 is broken down into the following sections:
Initialization e.g. Variables such as App Vendor, App Name, App Version Pre-Installation e.g. Close applications, uninstall or clean-up previous versions Installation e.g. Install the primary application, or components of the application Post-Installation e.g. Drop additional files, registry tweaks Uninstallation e.g. Uninstall/rollback the changes performed in the install section.
Refer to PowerShellAppDeploymentToolkit Wiki for the original description.
Launching the Toolkit
There are two ways to launch the toolkit for deployment of applications.
- Launch “Deploy-Application.ps1” PowerShell script as administrator.
- Launch “Deploy-Application.exe” as administrator. This will launch the “Deploy-Application.ps1” PowerShell script without opening a PowerShell command window.
Note, if the x86 PowerShell is required (for example, if CAPICOM or another x86 library is needed), launch Deploy-Application.exe /32.
Deploy an application for installation
Deploy an application for uninstallation in silent mode
Deploy-Application.ps1 -DeploymentType "Uninstall" -DeployMode "Silent"
Deploy an application for installation, supressing the PowerShell console window and allowing reboot codes to be returned to the parent process
Deploy an application with a custom name instead of Deploy-Application.ps1
Deploy an application with a custom name and custom location for the script file
Deploy-Application.exe -Command "C:\Testing\Custom-Script.ps1" -DeploymentType "Uninstall"
The following parameters are accepted by Deploy-Application.ps1:
Specify whether to install or uninstall the application
-DeploymentType "Install" | "Uninstall" (default is install)
Specify whether the installation should be run in Interactive, Silent or NonInteractive mode
- Interactive = Shows dialogs
- Silent = No dialogs (progress and balloon tip notifications are supressed)
- NonInteractive = Very silent, i.e. no blocking apps. NonInteractive mode is automatically set if it is detected that the process is not user interactive
- DeployMode "Interactive" | "Silent" | "NonInteractive" (default is interactive)
Specify whether to allow the 3010 exit code (reboot required) to be passed back to the parent process (e.g. SCCM) if detected during an installation
If a 3010 code is passed to SCCM, the SCCM client will display a reboot prompt. If set to false, the 3010 return code will be replaced by a “0” (successful, no restart required).
-AllowRebootPassThru $true | $false (default is false)
Changes to user install mode and back to user execute mode for installing/uninstalling applications on Remote Desktop Session Host/Citrix servers
-TerminalServerMode $true | $false (default is false)
Disables logging to file for the script
-DisableLogging (switch parameter, default is false)