Thank you for the feedback. I figured out a workaround that allows us to use DISM and shows a progress indicator, though it does not give real-time updates on estimated time remaining but it is better than no feedback at all.
First, we had to add the required DISM Powershell modules to the Ivanti OS provisioning boot images. I had already installed the Windows 10 "Assessment and Deployment Kit" on my workstation. I used UltraISO to extract the boot.wim and boot_x64.wim from the provisioning ISO's Boot directory into my C:\Misc\PE folder. I created the mount point folders C:\Misc\PE\x86 and C:\Misc\PE\x64. Then I ran the following commands to mount each .wim file, install the necessary Powershell modules, and then commit those changes.:
Dism /Mount-Image /ImageFile:"C:\misc\pe\boot_x86.wim" /Index:1 /MountDir:"C:\Misc\PE\x86" Dism /Add-Package /Image:"C:\Misc\PE\x86" /PackagePath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\x86\WinPE_OCs\WinPE-WMI.cab" Dism /Add-Package /Image:"C:\Misc\PE\x86" /PackagePath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\x86\WinPE_OCs\WinPE-NetFx.cab" Dism /Add-Package /Image:"C:\Misc\PE\x86" /PackagePath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\x86\WinPE_OCs\WinPE-Scripting.cab" Dism /Add-Package /Image:"C:\Misc\PE\x86" /PackagePath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\x86\WinPE_OCs\WinPE-PowerShell.cab" Dism /Add-Package /Image:"C:\Misc\PE\x86" /PackagePath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\x86\WinPE_OCs\WinPE-DismCmdlets.cab" Dism /Unmount-Image /MountDir:"C:\Misc\PE\x86" /Commit Dism /Mount-Image /ImageFile:"C:\misc\pe\boot_x64.wim" /Index:1 /MountDir:"C:\Misc\PE\x64" Dism /Add-Package /Image:"C:\Misc\PE\x64" /PackagePath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\WinPE-WMI.cab" Dism /Add-Package /Image:"C:\Misc\PE\x64" /PackagePath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\WinPE-NetFx.cab" Dism /Add-Package /Image:"C:\Misc\PE\x64" /PackagePath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\WinPE-Scripting.cab" Dism /Add-Package /Image:"C:\Misc\PE\x64" /PackagePath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\WinPE-PowerShell.cab" Dism /Add-Package /Image:"C:\Misc\PE\x64" /PackagePath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\WinPE-DismCmdlets.cab" Dism /Unmount-Image /MountDir:"C:\Misc\PE\x64" /Commit
Then I replaced the existing boot.wim and boot_x64.wim files in the os provisioning .ISO with the modified .wim files.
In my provisioning template's "OS Installation" section I created a "Map to Preferred Server" action called "Map drive to preferred server". I mapped P: to our Packages folder on our server.
Right below that action I created an "Execute File" action with the following settings:
- Target path and filename: X:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
- Command-line parameters: -executionpolicy bypass -nologo -noprofile -file "P:\Provisioning\OS_Installation\RestoreImage\win10x641709base.ps1"
- Expected return value: = 0
- Stop processing the template if action fails: True
I created a Powershell script called "P:\Provisioning\OS_Installation\RestoreImage\win10x641709base.ps1" with the following in it:
Import-Module dism $StartTime = Get-Date write-host "StartTime = $StartTime" Expand-WindowsImage -ApplyPath C:\ -ImagePath "P:\images\win10x641709base.wim" -Index 1 $EndTime = Get-Date write-host "EndTime = $EndTime" $Duration = NEW-TIMESPAN –Start $StartTime –End $EndTime write-host "Duration = $Duration"
This way we are now able to use DISM - Microsoft's recommended method for capturing and restoring Windows images - with a progress indicator in Ivanti's OS provisioning environment.