- Choose an editor for PSADT scripts and explain why the PowerShell ISE is not the long-term choice
- Read PSADT and MSI logs with CMTrace and look up error codes
- Inspect an MSI with Orca, Get-ADTMsiTableProperty or the Windows Installer COM object
- Start a SYSTEM shell with PsExec for testing and name the risk
- Verify an installer's hash and signature, and find silent switches and uninstall strings
- Explain what an administrative installation and a transform are, and how PSADT applies a transform
Before the first real package is built in lesson 4, this lesson sets up the tools around it. None of them is required to run PSADT, and apart from the WiX Toolset in larger organisations, none needs a payment. The lesson is ordered by task, and every tool is named with the place it officially comes from.
CL01: psadt-L3-start, the clean state for package tests, and psadt-L3-end, with the tools, for analysis work. Everything else in this lesson is installed on the packaging machine PKG01.
Writing scripts
Visual Studio Code with the PowerShell extension is what Microsoft calls "the recommended editor for writing PowerShell scripts" in Using Visual Studio Code for PowerShell Development. It supports PowerShell 7.2 and later and Windows PowerShell 5.1 (the extension's README says "on a best-effort basis"). PowerShell: Show Session Menu in the Command Palette (Ctrl+Shift+P) switches between them, which matters because the PSADT launcher runs packages under Windows PowerShell 5.1 by default. The README also lists PSScriptAnalyzer findings in the editor and a Toggle ISE Mode command. VS Code is free from code.visualstudio.com; the extension is ms-vscode.PowerShell in the Visual Studio Marketplace (MIT licence).
Windows PowerShell ISE is still part of Windows. According to Introducing the Windows PowerShell ISE, it is "no longer in active feature development", still receives security and high-priority servicing fixes, and supports Windows PowerShell up to 5.1 only, with no support for PowerShell 6 and later. It works for a quick edit on a machine where nothing can be installed. Since Windows PowerShell 5.1 itself is deprecated and Microsoft recommends planning the move to PowerShell 7 (KB5137172), an editor limited to 5.1 is not the place for new work.
Notepad++ and similar text editors suit logs, .ini and .xml files, but offer no PowerShell debugging or code analysis.
| Situation | Editor |
|---|---|
Writing and debugging Invoke-AppDeployToolkit.ps1 | VS Code with the PowerShell extension |
| Quick edit on a locked-down server or test VM | PowerShell ISE or Notepad |
| Reading config and text files side by side | Notepad++ or any text editor |
PSScriptAnalyzer also runs on its own: Install-Module -Name PSScriptAnalyzer -Scope CurrentUser, then Invoke-ScriptAnalyzer -Path .\Invoke-AppDeployToolkit.ps1.
Reading logs
PSADT writes its log in CMTrace format, and Windows Installer writes plain text. Notepad opens both and is always available.
CMTrace makes the PSADT log readable. According to the CMTrace page on Microsoft Learn, it shows errors with a red background and yellow text and warnings with a yellow background, and Tools > Error Lookup translates a decimal or hexadecimal code into its Windows, WMI or WinHTTP description. It also reads plain-text logs such as Windows Installer logs. CMTrace is not a separate download: Configuration Manager installs it in the site server's tools directory (cd.latest\SMSSETUP\Tools\CMTrace.exe), on management points (C:\SMS_CCM\CMTrace.exe), on every client (C:\Windows\CCM\CMTrace.exe) and in boot images. On first start it offers to associate itself with .log files. Without a Configuration Manager system to copy it from, Notepad is enough for this course.
OneTrace is the log viewer of Support Center, also part of Configuration Manager. Its installer is on the site server at cd.latest\SMSSETUP\Tools\SupportCenter\SupportCenterInstaller.msi, and OneTrace is installed as C:\Program Files (x86)\Configuration Manager Support Center\CMPowerLogViewer.exe (Support Center OneTrace). It adds tabs, better search and log groups. It needs WPF, so it does not run in Windows PE, where CMTrace remains the tool.
Inspecting an MSI
Before an MSI is packaged, its Property table is read: product code, version, upgrade code, manufacturer and any public properties the vendor documents. Three ways need no purchase.
Orca is Microsoft's database table editor for Windows Installer packages. Orca.exe on Microsoft Learn states that it is available only in the Windows SDK Components for Windows Installer Developers, as an MSI in a subfolder of bin under the installed Windows Kits (for example Orca-x86_en-us.msi). The Windows SDK goes on the packaging machine, and Orca is installed from that MSI. Orca shows every table and validates a package. It can also edit an MSI, but vendor files stay unchanged; customisations belong in a transform.
Get-ADTMsiTableProperty ships with PSADT and needs no open session. It returns a read-only dictionary of the Property table:
# Read the Property table of an MSI with PSADT (module installed as in lesson 2)
Import-Module -Name PSAppDeployToolkit
$props = Get-ADTMsiTableProperty -LiteralPath 'C:\Lab\Source\7z2606-x64.msi'
'{0} {1} {2}' -f $props['ProductName'], $props['ProductVersion'], $props['ProductCode']The Windows Installer COM object is part of Windows and works without any module, for example on a test VM where nothing is installed:
# Read ProductCode and ProductVersion through the Windows Installer COM object
$installer = New-Object -ComObject WindowsInstaller.Installer
$database = $installer.GetType().InvokeMember('OpenDatabase', 'InvokeMethod', $null, $installer, @('C:\Lab\Source\7z2606-x64.msi', 0))
foreach ($name in 'ProductCode', 'ProductVersion') {
$view = $database.GetType().InvokeMember('OpenView', 'InvokeMethod', $null, $database, @("SELECT Value FROM Property WHERE Property = '$name'"))
$view.GetType().InvokeMember('Execute', 'InvokeMethod', $null, $view, $null)
$record = $view.GetType().InvokeMember('Fetch', 'InvokeMethod', $null, $view, $null)
'{0,-15} {1}' -f $name, $record.GetType().InvokeMember('StringData', 'GetProperty', $null, $record, @(1))
$view.GetType().InvokeMember('Close', 'InvokeMethod', $null, $view, $null)
}
# Release the database so the MSI file is not left open
[void][System.Runtime.InteropServices.Marshal]::ReleaseComObject($database)The verbose InvokeMember form works in Windows PowerShell 5.1 and PowerShell 7 alike. Open mode 0 is msiOpenDatabaseModeReadOnly (Installer.OpenDatabase).
Running as SYSTEM
Configuration Manager and Intune run system-context packages as the local SYSTEM account. PsExec from Microsoft Sysinternals starts a process under that account. It is part of PsTools (PSTools.zip), needs no installation and runs on Windows 8.1 and Windows Server 2012 or later. The switches used here, as documented:
| Switch | Meaning (Sysinternals documentation) |
|---|---|
-s | Run the remote process in the System account (without a computer name, PsExec runs locally) |
-i | Interact with the desktop of the given session; without a session number, the console session |
-d | Do not wait for the process to end |
-accepteula | Suppress the licence dialog |
REM Open an interactive Windows PowerShell console as SYSTEM (from an elevated console)
C:\Tools\psexec.exe -accepteula -i -s powershell.exe
REM Inside that console, whoami returns: nt authority\systemA package started from that console runs as SYSTEM. Over Remote Desktop the window may not appear, because -i without a number targets the console session; query session marks the current session with >, and its ID goes after -i (-i 2). File path arguments must be absolute, and the exit code PsExec reports is that of the started program.
Testing on a clean system
Every package test starts from the same clean state.
- Hyper-V checkpoints. A checkpoint saves the state of a VM; applying it reverts the VM. Using checkpoints distinguishes standard checkpoints, which include the memory state, from production checkpoints, which use VSS and do not. Production is the default; after a production checkpoint is applied, the VM is off and is started again. On the host,
Checkpoint-VM -Name <VMName> -SnapshotName <CheckpointName>creates a named checkpoint,Get-VMCheckpoint -VMName <VMName>lists them, andRestore-VMCheckpoint -Name <CheckpointName> -VMName <VMName> -Confirm:$falseapplies one without the confirmation prompt thatRestore-VMSnapshotshows by default.Rename-VMCheckpointgives an existing checkpoint a new name. Other hypervisors provide the same function as snapshots; the course uses the Hyper-V cmdlets as examples. - Windows Sandbox is a disposable desktop: closing it deletes all software, files and state, and each launch starts clean (Windows Sandbox). Since Windows 11 22H2, restarts started inside the sandbox keep its data. It is available on Pro, Enterprise and Education (not Home), is enabled as the optional feature Windows Sandbox (
Containers-DisposableClientVM), and needs virtualization, or nested virtualization inside a VM (Install Windows Sandbox). It suits a first look at an unknown installer, but does not replace the test VM, because nothing prepared survives between sessions.
Seeing what an installer does
- Process Monitor shows file system, registry and process activity in real time. A capture filtered on the installer shows which files and keys it writes, which helps with clean-up and detection.
- Process Explorer shows which handles and DLLs a process has open, for example a locked file, or the exact process names for
AppProcessesToClose.
Both are free Sysinternals tools without installation. Their pages, like the Sigcheck page, list Windows 11 and Windows Server 2019 or later under Runs on; a Windows 10 test VM is outside that documented range.
Verifying sources
# Hash and signature of an installer before it goes into a package
$file = 'C:\Lab\Source\7z2606-x64.msi'
(Get-FileHash -Path $file -Algorithm SHA256).Hash
Get-AuthenticodeSignature -FilePath $file | Select-Object -Property Status, StatusMessage, SignerCertificateGet-FileHash produces the value compared with a vendor checksum or with the hash recorded in lesson 1. Get-AuthenticodeSignature reports the signature in Status, with values such as Valid, NotSigned, HashMismatch and NotTrusted. Valid "does not imply trust", so the signer in SignerCertificate is checked too. The 7-Zip MSI returns NotSigned, so its hash is the check that counts. An unsigned installer is not proof of tampering, but HashMismatch is a reason to stop. Sigcheck from Sysinternals shows the catalog name and signing chain (-i) and file hashes (-h) (Sigcheck).
Finding switches, extracting, administrative installs, transforms
Silent switches and uninstall strings
The order of sources: the vendor's deployment documentation first, then the installer's own help (setup.exe /? often shows a usage dialog), then the uninstall information an installed copy leaves in the registry. PSADT reads that registry data with Get-ADTApplication, which searches the machine-wide uninstall keys (64-bit and 32-bit) and the current user's key, and matches -Name as "contains" by default:
# Show how an installed application can be removed, as recorded in the uninstall registry
Import-Module -Name PSAppDeployToolkit
Get-ADTApplication -Name '7-Zip' |
Select-Object -Property DisplayName, DisplayVersion, ProductCode, WindowsInstaller, UninstallString, QuietUninstallStringOn the clean VM it returns nothing; it needs a machine with 7-Zip installed. WindowsInstaller is true when the entry's WindowsInstaller value is 1 or its uninstall string calls msiexec, and only then is a GUID key name returned as ProductCode. For EXE installers, QuietUninstallString, where provided, is the silent removal command; EXE switches are covered in depth in the advanced course.
Extracting an MSI from an EXE
Many EXE installers carry an MSI inside. Extracting it is only worth doing in a documented way:
- Vendor documentation. Some vendors document an extraction or administrative switch, or offer the MSI as a separate enterprise download. This is the preferred route.
- WiX Burn bundles. For bundles built with the WiX Toolset, the wix.exe reference describes
wix burn extract [options] bundle.exe -o outputfolder;-oreceives the bundle's containers,-obathe bootstrapper application.wix.exeis a .NET tool (dotnet tool install --global wix, .NET SDK 6 or later). Under the Open Source Maintenance Fee, organisations with more than USD 10,000 annual revenue must sponsor the project, and WiX v7 requires EULA acceptance (wix eula accept wix7). - Temporary folder (observation, not a documented method). Some installers unpack their MSI into
%TEMP%while their first dialog is open. Copying it from there sometimes works, but nothing guarantees that the extracted MSI installs correctly without the EXE wrapper's own logic. Such an MSI is tested like any other source and documented as an unofficial extraction.
Administrative installation
msiexec /a performs an administrative installation: it creates a source image of the product (an MSI plus unpacked files) without installing the product. During an administrative installation, TARGETDIR "specifies the location to copy the installation package". The image shows which files an MSI contains, or provides an unpacked source:
REM Create an administrative image of the MSI in C:\Lab\AdminImage\7-Zip
msiexec /a "C:\Lab\Source\7z2606-x64.msi" /qn TARGETDIR="C:\Lab\AdminImage\7-Zip"Features with level 0 in the Feature table are left out of the image. Microsoft notes that applying a transform while creating an administrative image "has no valid effect"; transforms are applied when installing from the image.
Transforms
A transform (.mst) is a set of changes to an MSI's tables, applied at installation time without modifying the vendor's MSI. Typical uses are fixed property values, disabled features or removed shortcuts. Three free ways to create one:
- MsiTran.exe, from the same Windows SDK components as Orca, generates a transform from the difference between a base and a reference database:
msitran -g base.msi changed.msi changes.mst(Msitran.exe). - Orca offers transform functions in its interface. The Microsoft Learn page on Orca does not describe them, so this course does not walk through them.
- New-ADTMsiTransform in PSADT creates a transform that sets Property table values.
-MsiPathand-TransformPropertiesare mandatory; without-NewTransformPath, the transform is named after the MSI and placed next to it. The function works on a temporary copy in the MSI's folder, which must therefore be writable, and fails if the properties change nothing. The 7-Zip MSI setsALLUSERSto2, so this example is a real change:
# Create a transform that sets one property, without modifying the vendor MSI
Import-Module -Name PSAppDeployToolkit
New-ADTMsiTransform -MsiPath 'C:\Lab\Source\7z2606-x64.msi' -NewTransformPath 'C:\Lab\Source\7z2606-x64.mst' -TransformProperties @{ ALLUSERS = 1 }
# Check: read the property with the transform applied (expected value: 1)
(Get-ADTMsiTableProperty -LiteralPath 'C:\Lab\Source\7z2606-x64.msi' -TransformPath 'C:\Lab\Source\7z2606-x64.mst')['ALLUSERS']In a package, PSADT applies the transform through the -Transforms parameter of Start-ADTMsiProcess (type String[], optional). The 4.1.8 help states that transform files "should be in the same directory as the MSI file"; a file name found there is expanded to its full path:
# Install the MSI with a transform from the Files folder
Start-ADTMsiProcess -Action Install -FilePath '7z2606-x64.msi' -Transforms '7z2606-x64.mst'PSADT adds TRANSFORMS="<path>" and TRANSFORMSSECURE=1 to the msiexec command line; Windows Installer applies the TRANSFORMS list and caches secure transforms where users cannot write. A missing transform ends with error 1624, "Error applying transforms".
The Microsoft Win32 Content Prep Tool (IntuneWinAppUtil.exe) for Intune follows in lesson 6. The MSIX Packaging Tool targets MSIX, which is outside this course.
Overview
| Task | Tool | Where it comes from | Free of charge |
|---|---|---|---|
| Write and debug scripts | VS Code + PowerShell extension | code.visualstudio.com, Visual Studio Marketplace | Yes |
| Quick edits | PowerShell ISE, Notepad | Part of Windows | Yes |
| Code analysis | PSScriptAnalyzer | PowerShell Gallery (Microsoft) | Yes |
| Read logs, look up error codes | CMTrace | Configuration Manager (site server tools, client folder) | Included with ConfigMgr |
| Read logs (tabs, log groups) | OneTrace / Support Center | Configuration Manager site server tools | Included with ConfigMgr |
| Inspect an MSI | Orca; Get-ADTMsiTableProperty; COM object | Windows SDK; PSADT module; part of Windows | Yes |
| Run as SYSTEM | PsExec | Sysinternals PsTools (Microsoft) | Yes |
| Watch an installer | Process Monitor, Process Explorer | Sysinternals (Microsoft) | Yes |
| Verify a source | Get-FileHash, Get-AuthenticodeSignature, Sigcheck | PowerShell; Sysinternals | Yes |
| Clean test state | Hyper-V checkpoints (or snapshots of another hypervisor), Windows Sandbox | Part of Windows (Pro, Enterprise, Education) | Yes |
| Uninstall strings | Get-ADTApplication | PSADT module | Yes |
| Extract a Burn bundle | wix burn extract | WiX Toolset (.NET tool) | Maintenance fee above USD 10,000 revenue |
| Create a transform | MsiTran, New-ADTMsiTransform | Windows SDK; PSADT module | Yes |
Common mistakes
| Symptom | Cause | Fix |
|---|---|---|
The SYSTEM console started with psexec -i -s does not appear over Remote Desktop | Without a session number, -i runs the process in the console session | Find the session ID with query session and pass it after -i, for example -i 2 |
Import-Module -Name PSAppDeployToolkit reports "Cannot write to function Add-ADTEdgeExtension because it is read-only or constant" | The module is already loaded in this console, for example from New-ADTTemplate in lesson 2 | Nothing to fix: the loaded module keeps working. Skip the import in this console or open a new one |
An antivirus product blocks or quarantines PsExec.exe | Some scanners report PsTools as infected because malware has used them | Have the security team approve PsExec for the lab systems; do not disable protection on a shared system |
| After a checkpoint is applied, the VM is switched off | Production checkpoints, the Hyper-V default, contain no memory state; after applying one, the VM is off | Start the VM again |
Get-AuthenticodeSignature reports HashMismatch | The file's hash does not match the hash stored with its signature | Do not package the file; download it again from the vendor and compare the hash |
An installation with a transform ends with 1624 | Windows Installer could not apply the transform; the documented hint is to verify the transform paths | Place the .mst in the same folder as the MSI and pass its file name to -Transforms |
Try it
On the Hyper-V host, apply the checkpoint
psadt-L3-startofCL01and start the VM if it is off. If the checkpoint does not exist yet, applypsadt-L2-endand take it:Checkpoint-VM -Name CL01 -SnapshotName psadt-L3-start. A checkpoint with a generic name can be renamed in Hyper-V Manager (right-click the checkpoint, Rename) or withRename-VMCheckpoint. Other hypervisors: the equivalent snapshot. Expected:CL01is in the clean state. Check:Get-VMCheckpoint -VMName CL01listspsadt-L3-start.On
PKG01, install VS Code and the PowerShell extension: open Quick Open with Ctrl+P, typeext install powershell, press Enter and install the PowerShell extension from Microsoft. OpenC:\Lab\Packages\HelloPSADT\Invoke-AppDeployToolkit.ps1from lesson 2. In the lab run with VS Code 1.148.0, the first start offered a Copilot sign-in, which is not needed here (Continue without Signing In), and the file opened in Restricted Mode, in which extensions are limited; select Manage in the banner and then Trust. Run PowerShell: Show Session Menu from the Command Palette (Ctrl+Shift+P) and select the Windows PowerShell session; in the lab run with extension version 2025.4.0, the menu showed it as Current session: Windows PowerShell (x64). Expected: the wrapper script appears with syntax colouring, and Windows PowerShell 5.1 is the active session. Check: in the integrated console,$PSVersionTable.PSVersionshows major version5and minor version1.On
PKG01, install the Windows SDK with its Windows Installer tools, then locate and install Orca:powershell# Find the Orca installer that the Windows SDK placed under Windows Kits Get-ChildItem -Path "${env:ProgramFiles(x86)}\Windows Kits" -Recurse -Filter 'Orca*.msi' -ErrorAction SilentlyContinue | Select-Object -Property FullNameExpected: the command lists at least one
Orca*.msi, and Orca starts after its installation.Open
C:\Lab\Source\7z2606-x64.msiin Orca, select thePropertytable, and compareProductCodewith the GUID found in the uninstall registry in lesson 1. Add the product code toC:\Lab\Notes.md. Expected: the same GUID in both places. Check: theGet-ADTMsiTablePropertycommand from Inspecting an MSI prints the sameProductCode.On
PKG01, run the hash and signature check from Verifying sources forC:\Lab\Source\7z2606-x64.msi. Expected: the hash equals the value inNotes.md, andStatusisNotSigned. Check:(Get-FileHash -Path 'C:\Lab\Source\7z2606-x64.msi' -Algorithm SHA256).Hashagainst the line inNotes.md.On
PKG01, create an administrative image of the MSI. It unpacks the files but does not install 7-Zip:powershell# Administrative installation: create a source image, wait for msiexec to finish $adminArgs = '/a "C:\Lab\Source\7z2606-x64.msi" /qn TARGETDIR="C:\Lab\AdminImage\7-Zip"' $result = Start-Process -FilePath 'msiexec.exe' -ArgumentList $adminArgs -Wait -PassThru "msiexec exit code: $($result.ExitCode)"Expected: exit code
0;C:\Lab\AdminImage\7-Zipholds an MSI and the unpacked program files. Check:Get-ChildItem -Path 'C:\Lab\AdminImage\7-Zip' -Recurse -File | Select-Object -First 10 -Property FullName.On
CL01, createC:\Tools, copyPsExec.exefrom the PsTools download and, if a Configuration Manager system is available,CMTrace.exeinto it. Expected: the tools are inC:\Tools. Check:Get-ChildItem -Path 'C:\Tools'.Open an elevated console on
CL01and start a SYSTEM console withC:\Tools\psexec.exe -accepteula -i -s powershell.exe(over Remote Desktop, add the session ID after-i). In the new window, runwhoami, then close the window. Expected:whoamiprintsnt authority\system.If CMTrace is available, start it on
CL01and try Tools > Error Lookup with1603. On its first start, CMTrace asks whether it should become the default viewer for log files; either answer works for this exercise. Otherwise look up 1603 in the system error codes list. Expected: the description "Fatal error during installation."On the host, take the checkpoint
psadt-L3-end:Checkpoint-VM -Name CL01 -SnapshotName psadt-L3-end. Keeppsadt-L3-startunchanged. Expected: two checkpoints, the clean one and the one with the tools. Check:Get-VMCheckpoint -VMName CL01listspsadt-L3-startandpsadt-L3-end.Find the uninstall string of an MSI. On
CL01, copy the MSI toC:\Lab\Source\, createC:\Lab\Logs\and repeat the silent installation from lesson 1, step 5. Then read the uninstall information:powershell# Show the uninstall information that the 7-Zip MSI left in the registry Get-ChildItem -Path 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall' | Get-ItemProperty | Where-Object { $_.DisplayName -like '7-Zip*' } | Select-Object -Property PSChildName, DisplayName, UninstallString, QuietUninstallStringExpected:
UninstallStringisMsiExec.exe /I{23170F69-40C1-2702-2606-000001000000}, the product code from step 4, andQuietUninstallStringis empty. The entry uses/I, not/X: run on an installed product, it opens the maintenance dialog instead of removing it. A silent removal therefore callsmsiexec.exe /xwith/qn; in lesson 4,Start-ADTMsiProcess -Action Uninstalldoes this.On the host, apply
psadt-L3-endagain, so that the test installation from step 11 is gone. Expected:CL01has the tools and no 7-Zip installation. Check: onCL01,Test-Path -Path 'C:\Program Files\7-Zip'returnsFalse.
Check your understanding
- Why is VS Code with the PowerShell extension preferred over the PowerShell ISE for new work?
Answer
Microsoft names VS Code with the PowerShell extension as the recommended editor. The ISE is no longer in active feature development and supports Windows PowerShell 5.1 only, which itself is deprecated. VS Code supports both 5.1 and PowerShell 7 and shows PSScriptAnalyzer findings while editing.
- Where does CMTrace come from, and what does Error Lookup do?
Answer
CMTrace is installed by Configuration Manager, for example on clients as C:\Windows\CCM\CMTrace.exe and on the site server under cd.latest\SMSSETUP\Tools. Tools > Error Lookup translates a decimal or hexadecimal error code into its Windows, WMI or WinHTTP description.
- Which three free ways are there to read the product code of an MSI?
Answer
Orca from the Windows SDK components for Windows Installer developers, Get-ADTMsiTableProperty from PSADT, and the WindowsInstaller.Installer COM object, which is part of Windows.
- What do the PsExec switches
-sand-ido, and why is a SYSTEM console closed after use?
Answer
-s runs the process in the System account, -i lets it interact with a desktop: the console session, or the session whose number follows -i. A SYSTEM console has full control over the machine, so it belongs on a test VM only and is closed after the test.
- What is a transform, and how does a PSADT package apply one?
Answer
A transform is a .mst file with changes to an MSI's tables, applied at installation time without modifying the vendor MSI. In PSADT, Start-ADTMsiProcess -Transforms applies it; the transform sits in the same folder as the MSI, and PSADT passes it to msiexec as TRANSFORMS with TRANSFORMSSECURE=1.
Get-AuthenticodeSignaturereturnsNotSignedfor one installer andHashMismatchfor another. What does each status mean for packaging, and what does an administrative installation add when the files of an MSI are to be inspected?
Answer
NotSigned means the file has no signature; that is not proof of tampering, and the recorded or vendor-published hash becomes the check that counts. HashMismatch means the file's hash does not match the hash stored with its signature; the file is not packaged. An administrative installation (msiexec /a) creates a source image of the MSI with its files unpacked, without installing the product, so the content can be inspected on the packaging machine.
Summary
- VS Code with the PowerShell extension is the editor for PSADT scripts; the ISE remains for quick edits under Windows PowerShell 5.1.
- CMTrace and OneTrace come with Configuration Manager; Notepad is always a fallback.
- Orca and MsiTran come from the Windows SDK;
Get-ADTMsiTableProperty,New-ADTMsiTransformand the Windows Installer COM object need no extra download. - PsExec starts a SYSTEM shell for tests, on test systems only; an administrative installation unpacks an MSI without installing it.
- Named checkpoints and Windows Sandbox provide a clean state;
Get-FileHash,Get-AuthenticodeSignatureand Sigcheck verify sources; vendor documentation comes first when looking for switches or extraction methods.
Sources
- Using Visual Studio Code for PowerShell development — https://learn.microsoft.com/en-us/powershell/scripting/dev-cross-plat/vscode/using-vscode (link from the lesson text; to be checked in stage 7)
- Introducing the Windows PowerShell ISE — https://learn.microsoft.com/en-us/powershell/scripting/windows-powershell/ise/introducing-the-windows-powershell-ise (link from the lesson text)
- CMTrace — https://learn.microsoft.com/en-us/intune/configmgr/core/support/cmtrace (link from the lesson text)
- Support Center OneTrace — https://learn.microsoft.com/en-us/intune/configmgr/core/support/support-center-onetrace (link from the lesson text)
- Orca.exe — https://learn.microsoft.com/en-us/windows/win32/msi/orca-exe (link from the lesson text)
- PsExec — https://learn.microsoft.com/en-us/sysinternals/downloads/psexec (ms.date 2026-11-05, checked 2026-11-30)
- Using checkpoints (Hyper-V) — https://learn.microsoft.com/en-us/windows-server/virtualization/hyper-v/checkpoints (ms.date 2024-07-31, checked 2026-11-30)
- Windows Sandbox — https://learn.microsoft.com/en-us/windows/security/application-security/application-isolation/windows-sandbox/ (link from the lesson text)
- SignatureStatus enum — https://learn.microsoft.com/en-us/dotnet/api/system.management.automation.signaturestatus (PowerShell SDK 1.1.0–7.6.0, checked 2026-11-30)
- Administrative installation — https://learn.microsoft.com/en-us/windows/win32/msi/administrative-installation (ms.date 2018-05-31, checked 2026-11-30)
- MsiExec.exe and InstMsi.exe error messages — https://learn.microsoft.com/en-us/windows/win32/msi/error-codes (ms.date 2023-02-08, checked 2026-11-30)
- PSAppDeployToolkit 4.1 — Start-ADTMsiProcess — https://psappdeploytoolkit.com/docs/4.1.x/reference/functions/Start-ADTMsiProcess (4.1.x, checked 2026-11-30)
- WiX Toolset — wix.exe reference — https://docs.firegiant.com/wix/tools/wixexe/ (link from the lesson text)
- WiX Toolset — Using WiX (.NET tool) — https://docs.firegiant.com/wix/using-wix/ (checked 2026-11-30)
- Open Source Maintenance Fee — https://docs.firegiant.com/wix/osmf/ (WiX v7, EULA ID
wix7, checked 2026-11-30)