Git Product home page Git Product logo

microsoft / surfacedeploymentaccelerator Goto Github PK

View Code? Open in Web Editor NEW
70.0 14.0 25.0 215 KB

Surface Deployment Accelerator (SDA) is a script-driven tool to create Windows images (WIM) for test or deployment that are similar in configuration to Bare Metal Recovery (BMR) images, minus certain preinstalled applications like the Surface UWP application.

License: MIT License

PowerShell 99.16% Batchfile 0.84%

surfacedeploymentaccelerator's Introduction

SurfaceDeploymentAccelerator

Surface Deployment Accelerator (SDA) is a script-driven tool to create Windows images (WIM) for test or deployment that closely match the configuration of Bare Metal Recovery (BMR) images, minus certain preinstalled applications like Microsoft Office and the Surface UWP application.

Need help?

Please use this GitHub Repos issue tracking capability to raise issues or feature requests.

Prerequisites


  • If you download the contents of this repository as a ZIP file from github.com on a Windows system, please right-click on the downloaded .zip file and select Properties, then check the "Unblock" box, and then click OK. ONLY THEN IS IT SAFE TO UNZIP THE FILE - If you do not do this, your deployments will fail.

  • Windows 10 2004 or newer environment to run the script.
  • Internet Explorer "first run experience" must have been completed in environment where script is run (you must run Internet Explorer once, otherwise driver/firmware and other downloads will fail and the script will throw errors indicating you have not run IE once in that environment before downloads will work properly).
  • Internet access from machine/environment where script is run (to download drivers and Office 365 - internet access is not required to use the image to (re)image devices, but is strongly recommended during that process as well).
  • The script must be run with administrative privileges to succeed.
  • Windows 10 2004 ADK/PE installed (script requires ADK/PE components to be installed in the environment used to create an image, and it will download/install them as necessary if they are not found).
  • USB drive, 16GB+ to hold image created by the script. This drive will be formatted for use as necessary.
  • At least 20GB of disk space free on the drive used to run the script, to store images and downloaded files.

How to use (general)

  • Acquire a Windows 10 1909 or newer ISO that includes Windows 10 Professional or Windows 10 Enterprise images

  • Open an elevated PowerShell prompt (not PSCore - currently this tool has not been fully tested with PSCore 6 or 7), change directory to where SDA was placed, and execute one of the following command to create an image - replace paths as appropriate.

  • DO NOT USE POWERSHELL ISE TO RUN THIS SCRIPT - use a regular PowerShell window.

  • To create a Windows 10 Professional image: X:\SurfaceDeploymentAccelerator\CreateSurfaceWindowsImage.ps1 -ISO "X:\en_windows_10_business_editions_version_2004_x64_dvd_d06ef8c5.iso" -OSSKU Pro -DestinationFolder C:\Output -Device SurfaceHub2

  • To create a Windows Enterprise image for use on a Surface Hub 2: X:\SurfaceDeploymentAccelerator\CreateSurfaceWindowsImage.ps1 -ISO "X:\en_windows_10_business_editions_version_2004_x64_dvd_d06ef8c5.iso" -OSSKU Enterprise -DestinationFolder C:\Output -Device SurfaceHub2

  • To create an image WITHOUT any additional patches downloaded/injected for a Surface Laptop 3: X:\SurfaceDeploymentAccelerator\CreateSurfaceWindowsImage.ps1 -ISO "X:\en_windows_10_business_editions_version_2004_x64_dvd_d06ef8c5.iso" -OSSKU Pro -DestinationFolder C:\Output -Device SurfaceLaptop3 -ServicingStack $false -CumulativeUpdate $false -CumulativeDotNetUpdate $false -AdobeFlashUpdate $false

  • To create an image WITHOUT DotNet 3.5 or Office 365 C2R installed for a Surface Pro 7: X:\SurfaceDeploymentAccelerator\CreateSurfaceWindowsImage.ps1 -ISO "X:\en_windows_10_business_editions_version_2004_x64_dvd_d06ef8c5.iso" -OSSKU Pro -DestinationFolder C:\Output -Device SurfacePro7 -DotNet35 $false -Office365 $false

  • Once the script writes the image to the selected USB drive and has completed, take the resulting USB key to the device, and boot to it. This will image the device and leave the device waiting in OOBE once complete.

  • To (re)image another device of the same type, simply use this USB key to (re)image that device as well.

Known issues


  • If you download the contents of this repository as a ZIP file from github.com on a Windows system, please right-click on the downloaded .zip file and select Properties, then check the "Unblock" box, and then click OK. ONLY THEN IS IT SAFE TO UNZIP THE FILE - If you do not do this, your deployments will fail.


  • If your PowerShell execution policy isn't "RemoteSigned" or less restrictive, the scripts will not execute and you will not be able to create an image to deploy.

  • If an image fails to create, files may be held open in %temp%\Mount. The script will detect files in this location on initial execution and fail if anything is found. You will need to manually dismount the image (dism /unmount-wim /mountdir:%temp%\Mount<folder>) to make certain that all folders under this location are unmounted. Any failures to unmount will require manual cleanup before the script will execute successfully again.
  • If the path to the SDA folder itself, the Output folder parameter, or the LocalDriverPath parameter (if UseLocalDriverPath is set to $True) contains spaces, the script will abort. Please make sure paths do not contain spaces.
  • Internet Explorer must be installed on the device used to create images, and first run wizard must be completed (you must successfully start Internet Explorer once) or file downloads may fail.
  • The Surface App from the Store is not sideloaded into the image at this time. You will need to add the AppX to your own deployment or install once the imaging is complete.
  • An ISO containing English or Chinese (simplified) currently work with "Pro" or "Enterprise" string matching - other languages will be added over time (to the Languages.xml file). Please file an issue here on Github if you have a language that we have not added as of yet. This tool does not currently support LTSC or other SKUs (although you could edit the script and Languages.xml to add SKUs you'd like to use, they are not officially supported via this tool at this time).
  • WinPE is always in English, at this time.
  • This tool does NOT clean up images once created, only temporary files. If you do not cleanup the Output folder, it will continue to consume more disk space for every image created.
  • On the very first execution, the \Logs folder sometimes is created in the location where CreateSurfaceWindowsImage.ps1 is executed from. This only happens once, and logs do get created in the Output folder as well. You can safely delete the Logs folder once script execution is complete.
  • The script supports Windows 10 1809 images or newer. No support is planned for anything prior to 1809, and this minimum version will change over time as Windows releases new builds. It is currently planned to be supported until 20H2 releases, at which point the minimum supported version of Windows 10 to use as an image source will move up to 1903.
  • Surface Hub 2 will support only Windows 10 Pro or Enterprise version 1903 and newer by default, and any future deviations will be documented here as well when possible.

Full parameter documentation

The parameters that are supported to configure for the script are as follows:

-ISO: Path to a Windows ISO file to use as the imaging source. (required)

-DestinationFolder: The folder used to place the resulting image files once complete. (required)

-DotNet35: Install .NET 3.5 in the image, True or False. True is the default.

-ServicingStack: Download/inject latest servicing stack update, True or False. True is the default.

-CumulativeUpdate: Download/inject latest cumulative update, True or False. True is the default. If SDA image will be used on a UFS device, please set this to True.

-CumulativeDotNetUpdate: Download/inject latest cumulative update, True or False. True is the default.

-AdobeFlashUpdate: Include latest Adobe Flash Player Security update, True or False. True is the default.

-Office365: Download and install the latest monthly C2R installation of Office 365, True or False. True is the default.

-Device: Enter Surface device type to download and inject latest drivers for. Possible values: SurfacePro4, SurfacePro5, SurfacePro6, SurfacePro7, SurfacePro7Plus, SurfacePro8, SurfacePro9Intel, SurfaceLaptop, SurfaceLaptop2, SurfaceLaptop3Intel, SurfaceLaptop3AMD, SurfaceLaptop4Intel, SurfaceLaptop4AMD, SurfaceLaptop5, SurfaceLaptopGo, SurfaceLaptopStudio, SurfaceBook, SurfaceBook2, SurfaceBook3, SurfaceStudio, SurfaceStudio2, SurfaceGo, SurfaceGoLTE, SurfaceGo2, SurfaceGo3, SurfaceHub2, and Custom. If this parameter is not specified, SurfacePro8 is used.

-CreateUSB: Create bootable USB installation when finished, True or False. True is the default.

-CreateISO: Create bootable ISO file when finished, True or False. True is the default.

-WindowsKitInstall: Enter target location of Windows ADK installation. If not specified, the path "${env:ProgramFiles(x86)}\Windows Kits\10\Assessment and Deployment Kit" will be used.

-InstallWIM: Edit Install.wim file, True or False. True is default.

-BootWIM: Edit boot.wim, True or False. True is default. This can stop a boot.wim from being updated. If you're forcing it to use another boot.wim separate from one installed by ADK, you may want to set this to $false so the boot.wim isn't touched. If you choose $false, it’s expected you're going to use your own boot.wim. This will also cause -CreateUSBKey to be forced to False, regardless of value passed in.

-KeepOriginalWIM: Keep customized unsplit WIM even if resulting image size is greater than 4GB (images over 4GB are split into SWM by default), True or False. True is default.

-UseLocalDriverPath Use a local driver path and skip downloading the latest MSI for Device, True or False. False is default. If this parameter is set, you must also set LocalDriverPath to a valid path containing the extracted drivers you wish to inject, or this will fail.

-LocalDriverPath Filesystem (accessible to this PowerShell instance) path containing drivers to use. Only read if UseLocalDriverPath is set to True.

-Automated If true, skips any pause commands in this script, default is false

surfacedeploymentaccelerator's People

Contributors

alexanderrydberg avatar cluberti avatar luy-ce avatar microsoft-github-operations[bot] avatar microsoft-github-policy-service[bot] avatar microsoftopensource avatar sneak-it avatar zayedrasha avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

surfacedeploymentaccelerator's Issues

404 error downloading SurfaceLaptopGo latest drivers

Downloading SurfaceLaptopGo_Win11_22000_23.030.102.0.msi to C:\Output\Enterprise\W11\10.0.22000\x64\Temp\SurfaceLaptopGo... Start-BitsTransfer : HTTP status 404: The requested URL does not exist on the server. At C:\sda\SurfaceDeploymentAccelerator-master\CreateSurfaceWindowsImage.ps1:446 char:9 + Start-BitsTransfer -Source $ActualURL -Destination "$global:O ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (:) [Start-BitsTransfer], Exception + FullyQualifiedErrorId : StartBitsTransferCOMException,Microsoft.BackgroundIntelligentTransfer.Management.NewBitsTransferCommand

No Drivers installed

Hi Team,
Love the tool, but he's not downloading the drivers. Tested it with Laptop Go V1 and the Laptop 3 Intel.

How to skip AuditMode

After generating the deployment image, when actually using it, it is found that the system will automatically enter AuditMode for the first time, and then complete the relevant installation configuration and re-Sysprep and then enter OOBE, can this process be optimized to avoid entering AuditMode! Microsoft Can 365 apps be installed in specialized phase?

You cannot call a method on a null-valued expression

I made an error trying to build the Windows 10 20H1 of the Surface Pro 7.

You cannot call a method on a null-valued expression. At C:\Users\ow\Documents\GitHub\SurfaceDeploymentAccelerator\CreateSurfaceWindowsImage.ps1:781 char:38 + ... string (,@($global:OSVersion.ToCharArray() | Select-Object -Last 5)) ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (:) [], RuntimeException + FullyQualifiedErrorId : InvokeMethodOnNull

New devices and W11 Surface Pro 9

Hi There,

Thank you for the amazing tool which help a lot with Surface Pro devices
Can you add Surface Pro 9 support please?

Regards,

USB Key

nice to have improvement - if the USB stick you inserted is not fully inserted or not recognized, the script just skips creating a USB key. It would be nice if the script would stop and ask if that's what you want to do or if you want to make sure you connected a USB stick.

Sysprep prompt

Hi,
nearing an end of the system deployment with Pro7+ image, I get a System Preparation Tool 3.14 prompt to choose whether to Generalize the installation, and if OOBE or Audit mode should be entered.

If I tick the Generalize check-box and have the Sysprep reboot to OOBE, an error is thrown and the whole process fails by renderding the system unbootable, please see below screenshot for reference. This step is not present in any other images created by your tool. Any suggestions please? What setting of Sysprep does the tool traditionally use?

Thanks!
IMG_8958

No Updates found or downloaded

Updates are not download. Tried this in a win 10 machine, IE is installed and working. same result for win 10 and win 11 ISO.

Downloading latest Servicing Stack update for 10.0.19044...
Attempting to find and download Servicing Stack updates for x64 Windows 10 version 21H2 for month 2022-06...
No update found for month (2022-06) - attempting previous month (2022-05)...                                                                      No update found for month (2022-05) - attempting previous month (2022-04)...                                                                      No update found for month (2022-04) - attempting previous month (2022-03)...                                                                      No update found for month (2022-03) - attempting previous month (2022-02)...                                                                      No update found for month (2022-02) - attempting previous month (2022-01)...                                                                      No update found for month (2022-01) - attempting previous month (2021-12)...
Unable to find update for past 6 months of searches.  Continuing...
Press Enter to continue...:                                                                                                                       Downloading latest Cumulative Update for 10.0.19044...                                                                                            Attempting to find and download Cumulative Update updates for x64 Windows 10 version 21H2 for month 2022-06...                                    No update found for month (2022-06) - attempting previous month (2022-05)...                                                                      No update found for month (2022-05) - attempting previous month (2022-04)...                                                                      No update found for month (2022-04) - attempting previous month (2022-03)...
No update found for month (2022-03) - attempting previous month (2022-02)...
No update found for month (2022-02) - attempting previous month (2022-01)...                                                                      No update found for month (2022-01) - attempting previous month (2021-12)...                                                                      Unable to find update for past 6 months of searches.  Continuing...                                                                               Press Enter to continue...:                                                                                                                       Press Enter to continue...:                                                                                                                       Downloading latest Adobe Flash update for 10.0.19044...
Attempting to find and download Adobe Flash Player updates for x64 Windows 10 version 21H2 for month 2022-06...
No update found for month (2022-06) - attempting previous month (2022-05)...
No update found for month (2022-05) - attempting previous month (2022-04)...                                                                      No update found for month (2022-04) - attempting previous month (2022-03)...                                                                      No update found for month (2022-03) - attempting previous month (2022-02)...                                                                      No update found for month (2022-02) - attempting previous month (2022-01)...                                                                      No update found for month (2022-01) - attempting previous month (2021-12)...                                                                      No update found for month (2021-12) - attempting previous month (2021-11)...
No update found for month (2021-11) - attempting previous month (2021-10)...
No update found for month (2021-10) - attempting previous month (2021-09)...                                                                      No update found for month (2021-09) - attempting previous month (2021-08)...                                                                      No update found for month (2021-08) - attempting previous month (2021-07)...                                                                      No update found for month (2021-07) - attempting previous month (2021-06)...                                                                      Unable to find update for past 12 month's of searches.  Continuing...                                                                             Press Enter to continue...:
Press Enter to continue...:

-BootWIM 0

gives this error:

Update-Win10WIM : Cannot process argument transformation on parameter 'UpdateBootWIM'. Cannot convert value "" to type "System.Boolean". Boolean parameters accept only Boolean values and numbers, such as $True, $False, 1 or 0.
At C:\Users\MrBalmer\Documents\GitHub\SurfaceDeploymentAccelerator\CreateSurfaceWindowsImage.ps1:2422 char:389
+ ... KitsInstall $WindowsKitsInstall -UpdateBootWIM $UpdateBootWIM -MakeUS ...
+                                                    ~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidData: (:) [Update-Win10WIM], ParameterBindingArgumentTransformationException
    + FullyQualifiedErrorId : ParameterArgumentTransformationError,Update-Win10WIM

SurfacePro3

Would it be possible to add SurfacePro3 to the Accelerator? Tried manually changing the url but I failed to find a aka.ms-url for drivers :/

Wim Pro not found

Hello,

this script doesn't find an Pro SKU wim on official ISO Microsoft or other by this command, can you help me?

c:\SurfaceDeploymentAccelerator\CreateSurfaceWindowsImage.ps1 -ISO "c:\Temp\Windows10.19041.1.191206.iso" -OSSKU Professionnel -DestinationFolder C:\Output -Device SurfacePro7

results:

Répertoire : C:\Output\Logs

Mode LastWriteTime Length Name


-a---- 01/07/2021 10:03 0 Log--Professionnel-x64--2021-07-01_10-03-54.log
Script start: 01/07/2021, 10:03:54
This space intentionally left blank...

SDA version: 1.2.5.6


  •                                       *
    
  •   Parameters passed to script:        *
    
  •                                       *
    

ISO path: c:\Temp\Windows10.19041.1.191206.iso
OS SKU: Professionnel
Architecture: x64
Output: C:\Output
.NET 3.5: True
Servicing Stack: True
Cumulative Update: True
Cumulative DotNet Updates: True
Adobe Flash Player Updates: True
Office 365 install: True
Device drivers: SurfacePro7
Create USB key: True
Create ISO: True

Deleting C:\Users\TOURPE~1.THO\AppData\Local\Temp\Mount\Scratch...
Mounting ISO c:\Temp\Windows10.19041.1.191206.iso...
ISO successfully mounted at F:

Parsing install.wim/install.esd file(s) in F: for images...
Checking F:\sources\install.wim for valid images...
No OS Image found in F:\sources\install.wim matching Professionnel, exiting.
Images inside F:\sources\install.wim :

ImagePath : F:\sources\install.wim
ImageName : Windows 10 Famille
ImageIndex : 1
ImageDescription : Windows 10 Famille
ImageSize : 14369879896

ImagePath : F:\sources\install.wim
ImageName : Windows 10 Famille N
ImageIndex : 2
ImageDescription : Windows 10 Famille N
ImageSize : 13603002886

ImagePath : F:\sources\install.wim
ImageName : Windows 10 Professionnel
ImageIndex : 3
ImageDescription : Windows 10 Professionnel
ImageSize : 14533311015

ImagePath : F:\sources\install.wim
ImageName : Windows 10 Professionnel N
ImageIndex : 4
ImageDescription : Windows 10 Professionnel N
ImageSize : 13776627113

It's not possible to call up a method for a term/expression that have NULL

When I try to create a Windows 11 Enterprise ISO (German localisation) for Surface 8 Pro I get the following error message (only in German language):

Es ist nicht möglich, eine Methode für einen Ausdruck aufzurufen, der den NULL hat.
In C:\Users\_PATH_TO_\SurfaceDeploymentAccelerator\CreateSurfaceWindowsImage.ps1:2002 Zeichen:9
+         $global:WinPEVersion = (& $DISMFile /Get-WimInfo /WimFile:$Im ...
+         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : InvokeMethodOnNull

But not found such a line in the log file.
PowerShell_Error

Issue downloading

When running the process, and it gets to downloading Updates, it fails to grab updates
image

Then it shows that it didn't find any updates at all
image

Pro not found in on Please make sure to use an ISO file that contains Pro, and try again.

 *********************************************
 *                                           *
 *       Parameters passed to script:        *
 *                                           *
 *********************************************

ISO path:                     C:\Users\Seonglae\Downloads\Windows.iso
OS SKU:                       Pro
Output:                       C:\Users\Seonglae\Downloads
Architecture:                 x64
  .NET 3.5:                   False
  Servicing Stack:            True
  Cumulative Update:          True
  Cumulative DotNet Updates:  True
  Adobe Flash Player Updates: True
  Device drivers:             SurfacePro7
  Create USB key:             False
  Create ISO:                 False


Deleting C:\Users\Seonglae\AppData\Local\Temp\Mount\Scratch\...
Mounting ISO C:\Users\Seonglae\Downloads\Windows.iso...
ISO successfully mounted at E:

Parsing install.wim file(s) in E: for images...
Pro not found in  on C:\Users\Seonglae\Downloads\Windows.iso.  Please make sure to use an ISO file that contains Pro, and try again.
  • English(united state) image
    cannot initialize accelerator

Error with Office365

when Office365 is set as true, it throws an error. seems the URL it is looking for is not valid anymore. Can you please fix it?

Downloads not working for office 365 and Surface laptop 4

While creating a new SDA flash drive I keep getting Failed to find driver and office.

Downloading SurfaceLaptop4_Win10_19042_22.042.17186.0.msi to C:\SDA\Output\Enterprise\W10\10.0.19044\x64\Temp\SurfaceLaptop4intel... Start-BitsTransfer : HTTP status 404: The requested URL does not exist on the server. At C:\Temp\SurfaceDeploymentAccelerator-master\CreateSurfaceWindowsImage.ps1:446 char:9 + Start-BitsTransfer -Source $ActualURL -Destination "$global:O ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (:) [Start-BitsTransfer], Exception + FullyQualifiedErrorId : StartBitsTransferCOMException,Microsoft.BackgroundIntelligentTransfer.Management.NewBits TransferCommand Downloaded File: C:\SDA\Output\Enterprise\W10\10.0.19044\x64\Temp\SurfaceLaptop4intel\SurfaceLaptop4_Win10_19042_22.042.17186.0.msi Extracting file C:\SDA\Output\Enterprise\W10\10.0.19044\x64\Temp\SurfaceLaptop4intel\SurfaceLaptop4_Win10_19042_22.042.17186.0.msi to C:\SDA\Output\Enterprise\W10\10.0.19044\x64\Temp\SurfaceLaptop4intel\Extract... Downloading latest Surface Ethernet drivers for SurfaceLaptop4intel...

Downloading Office 365 ...
aka.ms link: https://aka.ms/sdao365
Actual URL: https://download.microsoft.com/download/2/7/A/27AF1BE6-DD20-4CB4-B154-EBAB8A7D4A7E/officedeploymenttool_15928-20216.exe
File name: officedeploymenttool_15928-20216.exe
Using BITS to download files
Downloading officedeploymenttool_15928-20216.exe to C:\SDA\Output\Enterprise\W10\10.0.19044\x64\Temp\Office365...
Start-BitsTransfer : HTTP status 404: The requested URL does not exist on the server.
At C:\Temp\SurfaceDeploymentAccelerator-master\CreateSurfaceWindowsImage.ps1:446 char:9

  •     Start-BitsTransfer -Source $ActualURL -Destination "$global:O ...
    
  •     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [Start-BitsTransfer], Exception
    • FullyQualifiedErrorId : StartBitsTransferCOMException,Microsoft.BackgroundIntelligentTransfer.Management.NewBits
      TransferCommand

Downloaded File: C:\SDA\Output\Enterprise\W10\10.0.19044\x64\Temp\Office365\officedeploymenttool_15928-20216.exe

Extracting Office 365 offline installer...
Start-Process : This command cannot be run due to the error: The system cannot find the file specified.
At C:\Temp\SurfaceDeploymentAccelerator-master\CreateSurfaceWindowsImage.ps1:1536 char:5

  • Start-Process -FilePath "$Office365TempFile" -ArgumentList "/extr ...
    
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [Start-Process], InvalidOperationException
    • FullyQualifiedErrorId : InvalidOperationException,Microsoft.PowerShell.Commands.StartProcessCommand

Office offline setup file download appears to have failed. Exiting...

PS C:\Temp\SurfaceDeploymentAccelerator-master>

"Reboot" Popup during install from USB

The following popup was displayed during the initial install from USB on a Surface Book 3:

image

Furthermore, at that point during the installation, keyboard, touchpad, and screen touch are not available (possibly caused by missing drivers, see #18 ??), and one needs to connect an external mouse to respond to the prompt.

Is there a parameter or other means to prevent this popup and guarantee uninterrupted installation?

Thanks,

Markus Ruppel

WinRE failed to copy and update

Lots of errors in the script with WinRE. Seems to complete fine otherwise.

Copying WinRE image to C:\SDA\Image\Pro\W10\10.0.19044\x64\Temp\tmp_winre.wim...
Move-Item : An object at the specified path C:\Users\ITPC~1 does not exist.
At C:\sda\CreateSurfaceWindowsImage.ps1:2843 char:9
+         Move-Item -Path "$ImageMountFolder\Windows\System32\Recovery\ ...
+         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (:) [Move-Item], PSArgumentException
    + FullyQualifiedErrorId : Argument,Microsoft.PowerShell.Commands.MoveItemCommand



Mounting C:\SDA\Image\Pro\W10\10.0.19044\x64\Temp\tmp_winre.wim to C:\Users\ITPC~1\AppData\Local\Temp\Mount\WinREImage...
Mount-WindowsImage : The parameter is incorrect.
At C:\sda\CreateSurfaceWindowsImage.ps1:2849 char:9
+         Mount-WindowsImage -ImagePath $TmpWinREImage -Index 1 -Path $ ...
+         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Mount-WindowsImage], PSArgumentException
    + FullyQualifiedErrorId : Microsoft.Dism.Commands.MountWindowsImageCommand



Adding Servicing Stack updates to C:\Users\ITPC~1\AppData\Local\Temp\Mount\WinREImage...
Add-WindowsPackage : An error occurred. No operation was performed.
Verify that DISM is installed properly in the image, and then try the operation again.
At C:\sda\CreateSurfaceWindowsImage.ps1:2068 char:5
+     Add-WindowsPackage -Path $ImageMountFolder -PackagePath $PackageP ...
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Add-WindowsPackage], COMException
    + FullyQualifiedErrorId : Microsoft.Dism.Commands.AddWindowsPackageCommand



Saving C:\SDA\Image\Pro\W10\10.0.19044\x64\Temp\tmp_winre.wim...
DisMount-WindowsImage : The request is not supported.
At C:\sda\CreateSurfaceWindowsImage.ps1:2076 char:9
+         DisMount-WindowsImage -Path $ImageMountFolder -Save -CheckInt ...
+         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Dismount-WindowsImage], COMException
    + FullyQualifiedErrorId : Microsoft.Dism.Commands.DismountWindowsImageCommand



Mounting C:\SDA\Image\Pro\W10\10.0.19044\x64\Temp\tmp_winre.wim in C:\Users\ITPC~1\AppData\Local\Temp\Mount\WinREImage...
Mount-WindowsImage : The parameter is incorrect.
At C:\sda\CreateSurfaceWindowsImage.ps1:2083 char:9
+         Mount-WindowsImage -ImagePath $TempImagePath -Index 1 -Path $ ...
+         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Mount-WindowsImage], PSArgumentException
    + FullyQualifiedErrorId : Microsoft.Dism.Commands.MountWindowsImageCommand



Adding Cumulative updates to C:\Users\ITPC~1\AppData\Local\Temp\Mount\WinREImage...
Add-WindowsPackage : An error occurred. No operation was performed.
Verify that DISM is installed properly in the image, and then try the operation again.
At C:\sda\CreateSurfaceWindowsImage.ps1:2068 char:5
+     Add-WindowsPackage -Path $ImageMountFolder -PackagePath $PackageP ...
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Add-WindowsPackage], COMException
    + FullyQualifiedErrorId : Microsoft.Dism.Commands.AddWindowsPackageCommand



Adding Driver updates for SurfaceLaptop4Intel to C:\Users\ITPC~1\AppData\Local\Temp\Mount\WinREImage from C:\SDA\Image\Pro\W10\10.0.19044\x64\Temp\SurfaceLaptop4Intel...
Add-WindowsDriver : An error occurred. No operation was performed.
Verify that DISM is installed properly in the image, and then try the operation again.
At C:\sda\CreateSurfaceWindowsImage.ps1:2900 char:29
+ ...             Add-WindowsDriver -Path $WinREImageMountFolder -Driver $M ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Add-WindowsDriver], COMException
    + FullyQualifiedErrorId : Microsoft.Dism.Commands.AddWindowsDriverCommand

Add-WindowsDriver : An error occurred. No operation was performed.
Verify that DISM is installed properly in the image, and then try the operation again.
At C:\sda\CreateSurfaceWindowsImage.ps1:2900 char:29
+ ...             Add-WindowsDriver -Path $WinREImageMountFolder -Driver $M ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Add-WindowsDriver], COMException
    + FullyQualifiedErrorId : Microsoft.Dism.Commands.AddWindowsDriverCommand
....
...

Add-WindowsDriver : An error occurred. No operation was performed.
Verify that DISM is installed properly in the image, and then try the operation again.
At C:\sda\CreateSurfaceWindowsImage.ps1:2900 char:29
+ ...             Add-WindowsDriver -Path $WinREImageMountFolder -Driver $M ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Add-WindowsDriver], COMException
    + FullyQualifiedErrorId : Microsoft.Dism.Commands.AddWindowsDriverCommand
                                                                                                                                                   Dismount-WindowsImage                                                                                                                                Running                                                                                                                                           [ooooooooooooooooooooooooooooo                                                                                                         ]                                                                                                                                                        Deployment Image Servicing and Management tool
Version: 10.0.19041.1


Error: 2

Unable to access the image.
Make sure that the image path and the Windows directory for the image exist and you have Read permissions on the folder.

The DISM log file can be found at C:\Windows\Logs\DISM\dism.log


Saving C:\SDA\Image\Pro\W10\10.0.19044\x64\Temp\tmp_winre.wim...
DisMount-WindowsImage : The request is not supported.
At C:\sda\CreateSurfaceWindowsImage.ps1:2918 char:9
+         DisMount-WindowsImage -Path $WinREImageMountFolder -Save -Che ...
+         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Dismount-WindowsImage], COMException
    + FullyQualifiedErrorId : Microsoft.Dism.Commands.DismountWindowsImageCommand





 *********************************************
 *                                           *
 *            Saving winre.wim               *
 *                                           *
 *********************************************


Exporting C:\SDA\Image\Pro\W10\10.0.19044\x64\Temp\tmp_winre.wim to C:\Users\ITPC~1\AppData\Local\Temp\Mount\OSImage\Windows\System32\Recovery\winre.wim...
Export-WindowsImage : The system cannot find the file specified. (Exception from HRESULT: 0x80070002)
At C:\sda\CreateSurfaceWindowsImage.ps1:2938 char:9
+         Export-WindowsImage -SourceImagePath $TmpWinREImage -SourceIn ...
+         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Export-WindowsImage], FileNotFoundException
    + FullyQualifiedErrorId : Microsoft.Dism.Commands.ExportWindowsImageCommand

SB3 and SG2 MSIs not downloading.... yet.... (6th May 2020)

The products were announced today, and support for them was added to version 1.1.0. However, these devices are not yet available for purchase, and as such the aka.ms links are not live as of yet. Once the MSI files are available, I will test that they work and close this bug out with an update and date.

Error "Windows could not parse or process the unattend answer file for pass [specialize]."

After successful completion of SDA 1.2.5.4 (except the download errors raised in #18),

image

including creation of an USB stick for installation, the following error was displayed shortly after the reboot during installation on a Surface Book 3:

image

How can one prevent this error? Is it possibly related/caused by the download errors raised in #18 ?

Thank you for your help!

Best regards,

Markus Ruppel

New devices and W11 Surface Pro 8, Surface Laptop 4 etc

Hello,

Great tool, very useful way to reset a machine with the latest image ready for (re)deployment.

However, new machines are not on there, the SurfacePro8, the Surface Laptop 4 (which has been out a while) and other such newer Surface devices.

How often will this get updated to include other system?

Also, couldn't get the script to run on W11 machine, insisted on W10 so had to run in a HyperV.

Does the script support imaging with a W11 ISO?

No info on OSSKU parameter

As far as I can see there is no more information on which parameters we can use with "OSSKU"... other than Enterprise and Pro as per the README file.

Doesn't find OS Image with specified OSSKU with Win11 ISO File

Hello there

I'm currently struggeling to create Image with a Windows 11 ISO File as a base.
It tells that he can't find an OS Image, then exits and just shows a List with all OS Image Indexes where I can see at Index Nr. 3 the Enterprise Version.

Does anybody know how to resolve this issue?
Thanks in advance for every response.

Error downloading - "The remote server returned an error: (301) Moved Permanently."

With SDA 1.2.5.4, trying to build an Enterprise image Windows 10 (OSVersion: 10.0.19042, ReleaseId: 2009) for SurfaceBook3, there are download errors (see attached images) for some of the the SB3 drivers (Net drivers worked fine), VisualC++ runtimes (2013 x86/x64; 2019 x86/x64) and O365.
image
image
To allow for completion of the script, Office365 had to be set to $False.

Subsequently, the respective files could not be added to the wim file.
image

Please let me know how to fix this or fix the otherwise excellent script. Thanks!

Best regards,

Markus Ruppel

'SurfaceBook3' missing in 'Device' parameter possible values enum

Currently using Surface Deployment Accelerator v1.2.5.3 - when I executed the script with the -Device SurfaceBook3 param, I didn't receive any error correcting me there is no such value, as I fx. received when trying to execute -Device SurfaceLaptop3 without specifying the CPU vendor SKU 'am targeting.

Laptop Go 2, Pro 9 and Laptop 5 Support

Laptop Go 2, Pro 9 and Laptop 5 are not working with the tool. These devices have been release since last year. Please include support for those devices as otherwise customers - especially Commercial ones - are blocked.

Implement Push-Button reset features

Hi guys,

Great tool, used it to create an base Image for our Surface devices before provisioning them with Windows Autopilot WhiteGlove.
The reason we used this tool is that 50% of our Surface devices will fail to provision with Microsoft factory Image due to TPM firmware

This tool will benefit from the Push-Button reset features that will run a ScanState capture of the installed apps like O365 and save them to the C:\Recovery\Customizations folder which will allow a Wipe of the device and return to base image with installed O365 apps.

Thanks.

-CumulativeUpdate parameter has no impact

Source ISO: Windows 11, Version 22H2 (April 2023)

When using this image, SDA downloads a March CU (KB5023706) which it then attempts to insert (and fails)

If i specify -CumulativeUpdate $false, it has no impact on SDA, the CU still gets downloaded, and attempts to insert it into the installation (which fails)
img1
img2
img3

Typo in WinPE_Drivers.xml 1.3.0.0

There is a typo on line 456:

            <Driver name="surfacewakeontouchcontrol.inf">

should be:

            <Driver name="surfacewakeontouchcontrol.inf"/>

Device list is out of date

Tried creating an ISO for the SurfaceLaptop4 and the script issued this error:

Cannot validate argument on parameter 'Device'. The argument "SurfaceLaptop4" does not belong to the set "SurfacePro4,SurfacePro5,SurfacePro6,SurfacePro7,SurfacePro7Plus,SurfaceLaptop,SurfaceLaptop2,SurfaceLaptop3Intel,SurfaceLaptop3AMD,SurfaceLaptop4Intel,SurfaceLaptop4AMD,SurfaceLaptopGo,SurfaceBook,SurfaceBook2,SurfaceBook3,SurfaceStudio,SurfaceStudio2,SurfaceGo,SurfaceGoLTE,SurfaceGo2,SurfaceHub2,Custom" specified by the ValidateSet attribute.

Don't support Laptop 5

C:\Temp\SurfaceDeploymentAccelerator-master\CreateSurfaceWindowsImage.ps1 : 无法对参数“Device”执行参数验证。参数“Sur
faceLaptop5”不属于 ValidateSet 属性指定的集合“SurfacePro4,SurfacePro5,SurfacePro6,SurfacePro7,SurfacePro7Plus,Surface
Pro8,SurfaceLaptop,SurfaceLaptop2,SurfaceLaptop3Intel,SurfaceLaptop3AMD,SurfaceLaptop4Intel,SurfaceLaptop4AMD,SurfaceLa
ptopGo,SurfaceLaptopStudio,SurfaceBook,SurfaceBook2,SurfaceBook3,SurfaceStudio,SurfaceStudio2,SurfaceGo,SurfaceGoLTE,Su
rfaceGo2,SurfaceGo3,SurfaceHub2,Custom”。请提供一个此集合中的参数,然后重试此命令。
所在位置 行:1 字符: 194

  • ... ssku professional -destinationfolder c:\output -device SurfaceLaptop5
  •                                                        ~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidData: (:) [CreateSurfaceWindowsImage.ps1],ParameterBindingValidationException
    • FullyQualifiedErrorId : ParameterArgumentValidationError,CreateSurfaceWindowsImage.ps1

Update integration

When updating the wim with the latest updates, the script will install one update and then save the wim whilst dismounting. It will then remount for the next update. Instead of mounting, patching, saving and dismounting and repeating. Is it possible to have it inject all the updates at once. It may shave some time off the image creation

DCR - Make this tool create Upgrade Media besides just a WIM

This tool is a good start, but misses a critical piece that makes me leave it on the self and use OSDBuilder instead.
Using this tool, the only output I have is a WIM, great for OSD, not great for Windows Upgrades.
Request:

  • Provide the full Media, not just the WIM
  • Apply the Dynamic Updates to the Media (Both the ones that update the Setup files, and the ones that get applied to the WIM)

The goal is to use one process to create identical media used for both OSD & in place upgrades. This is a corporate requirement we have, to prevent drift of machines that are Net-New, and Upgraded.

If I missed an option that already does this, my apologies, this tool is quite amazing and does a lot, thank you.

Folder Remnants with Untouchable File Permissions

Running the script created a directory, C:\Users<My User>\AppData\Local\Temp\Mount , however the script wasn't able to complete in creating the deployment image. Re-running the script resulted in an error message that while Mount isn't empty the script can't be run. Attempting to delete the folder and it's contents has resulted in permissions issues both as administrator and local user.

FIX:
Opening the Folder Properties > Security Tab > Advanced
change ownership and all children's ownership to the Administrator group
Replace all child object permission entries with inheritable permission entries from this object
Delete as normal

Feel free to assign to me and I can expand the folder detection to include a delete option for the user

Insert Autopilot json

Possibility to import autopilot json to reimaged bare metal Surface device from location. That would make a big difference!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.