Jump to content

Fragen zu Referenzabbildern


Der letzte Beitrag zu diesem Thema ist mehr als 180 Tage alt. Bitte erstelle einen neuen Beitrag zu Deiner Anfrage!

Empfohlene Beiträge

Hallo,

 

ich plane gerade ein custom Image zu erstellen.

Vorläufig soll dieses nur per USB Stick ausgerollt werden, keine anderen Deploymentmethoden.

Nun zu meinem geplanten Ablauf.

 

Anforderungen an das Image:

  • W10 20H2
  • Integrierte Sprachpakete: DE/ENG/NL/CH
  • M365 und ein paar Business Anwendungen
  • vorläufig ein lokaler Admin User (dieser wird nach dem Domain join deaktiviert)

 

Meine geplante Vorgehensweise:

 

  1. W10 ISO in Hyper-V installieren auf meinem Rechner
  2. lokalen Admin anlegen und bis zur Windows Oberfläche weiter
  3. Sysprep starten (Vorher einen Snapshot machen?)
  4. Updates durchführen
  5. Programme installieren (ohne sie zu öffnen)
  6. Sprachpakete hinzufügen
  7. Taskleiste bearbeiten
  8. Startmenü bearbeiten und anpassen (Layout dann exportieren für spätere Images)
  9. Standardprogramme auswählen
  10. nicht benötigte Apps deinstallieren (Candycrush,...)
  11. Mit Sysprep verallgemeinern -> herunterfahren
  12. Aus dem ISO das .wim File rauskopieren

 

Installation auf Device:

  1. Mit WinPE starten (USB Stick mit PE Partition und NTFS Data Partition mit dem .wim File)
  2. und folgendes Deplyoment Script von Microsoft starten: ApplyImage.bat <Pfad zum wim File 1>
  3. @echo Apply-Image.bat
    @echo     Run from the reference device in the WinPE environment.
    @echo.
    @echo     This script erases the primary hard drive and applies a new image.
    @echo.
    @echo	  Make sure that this script is run from the folder that contains the
    @echo	  supporting scripts
    @echo.
    @echo UPDATE (November 2017)
    @echo * Added support for FFU deployments.	
    @echo.
    @echo UPDATE (JULY 2016):
    @echo * This script stops just after applying the image.
    @echo   This gives you an opportunity to add siloed provisioning packages (SPPs)
    @echo   so that you can include them in your recovery tools.
    @echo.
    @echo   After the script is complete, use apply-recovery.bat to finish
    @echo   setting up the recovery tools.
    @echo.
    @echo * This script creates a now includes support for the /EA variables for quicker
    @echo   image capture and recovery.
    @echo.
    @echo * This script now includes support for the /EA variables for quicker
    @echo   image capture and recovery.
    @echo.
    @echo * This script now checks to see if you're booted into Windows PE.
    @echo.
    @if not exist X:\Windows\System32 echo ERROR: This script is built to run in Windows PE.
    @if not exist X:\Windows\System32 goto END
    @if %1.==. echo ERROR: To run this script, add a path to a Windows image file and index.
    @if %1.==. echo Example: ApplyImage D:\WindowsWithFrench.wim 1
    @if %1.==. goto END
    @if %2.==. echo ERROR: To run this script, add a path to a Windows image file and index.
    @if %2.==. echo Example: ApplyImage D:\WindowsWithFrench.wim 1
    @if %2.==. goto END
    @echo *********************************************************************
    @echo  == Setting high-performance power scheme to speed deployment ==
    @call powercfg /s 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c
    @echo *********************************************************************
    @echo Checking to see the type of image being deployed
    @if "%~x1" == ".wim" (GOTO WIM)
    @if "%~x1" == ".ffu" (GOTO FFU)
    @echo *********************************************************************
    @if not "%~x1" == ".ffu". if not "%~x1" == ".wim" echo Please use this script with a WIM or FFU image.
    @if not "%~x1" == ".ffu". if not "%~x1" == ".wim" GOTO END
    :WIM
    @echo Starting WIM Deployment
    @echo *********************************************************************
    @echo Checking to see if the PC is booted in BIOS or UEFI mode.
    wpeutil UpdateBootInfo
    for /f "tokens=2* delims=	 " %%A in ('reg query HKLM\System\CurrentControlSet\Control /v PEFirmwareType') DO SET Firmware=%%B
    @echo            Note: delims is a TAB followed by a space.
    @if x%Firmware%==x echo ERROR: Can't figure out which firmware we're on.
    @if x%Firmware%==x echo        Common fix: In the command above:
    @if x%Firmware%==x echo             for /f "tokens=2* delims=	 "
    @if x%Firmware%==x echo        ...replace the spaces with a TAB character followed by a space.
    @if x%Firmware%==x goto END
    @if %Firmware%==0x1 echo The PC is booted in BIOS mode. 
    @if %Firmware%==0x2 echo The PC is booted in UEFI mode. 
    @echo *********************************************************************
    @echo Do you want to create a Recovery partition?
    @echo    (If you're going to be working with FFUs, and need 
    @echo     to expand the Windows partition after applying the FFU, type N). 
    @SET /P RECOVERY=(Y or N):
    @if %RECOVERY%.==y. set RECOVERY=Y
    @echo Formatting the primary disk...
    @if %Firmware%==0x1 echo    ...using BIOS (MBR) format and partitions.
    @if %Firmware%==0x2 echo    ...using UEFI (GPT) format and partitions. 
    @echo CAUTION: All the data on the disk will be DELETED.
    @SET /P READY=Erase all data and continue? (Y or N):
    @if %READY%.==y. set READY=Y
    @if not %READY%.==Y. goto END
    @if %Firmware%.==0x1. if %RECOVERY%.==Y. diskpart /s CreatePartitions-BIOS.txt
    @if %Firmware%.==0x1. if not %RECOVERY%.==Y. diskpart /s CreatePartitions-BIOS-FFU.txt
    @if %Firmware%.==0x2. if %RECOVERY%.==Y. diskpart /s CreatePartitions-UEFI.txt
    @if %Firmware%.==0x2. if not %RECOVERY%.==Y. diskpart /s CreatePartitions-UEFI-FFU.txt
    @echo *********************************************************************
    @echo  == Apply the image to the Windows partition ==
    @SET /P COMPACTOS=Deploy as Compact OS? (Y or N):
    @if %COMPACTOS%.==y. set COMPACTOS=Y
    @echo Does this image include Extended Attributes?
    @echo    (If you're not sure, type N).
    @SET /P EA=(Y or N):
    @if %EA%.==y. set EA=Y
    @if %COMPACTOS%.==Y.     if %EA%.==Y.     dism /Apply-Image /ImageFile:%1 /Index:%2 /ApplyDir:W:\ /Compact /EA
    @if not %COMPACTOS%.==Y. if %EA%.==Y.     dism /Apply-Image /ImageFile:%1 /Index:%2 /ApplyDir:W:\ /EA
    @if %COMPACTOS%.==Y.     if not %EA%.==Y. dism /Apply-Image /ImageFile:%1 /Index:%2 /ApplyDir:W:\ /Compact
    @if not %COMPACTOS%.==Y. if not %EA%.==Y. dism /Apply-Image /ImageFile:%1 /Index:%2 /ApplyDir:W:\
    @echo *********************************************************************
    @echo == Copy boot files to the System partition ==
    W:\Windows\System32\bcdboot W:\Windows /s S:
    @echo *********************************************************************
    @echo   Next steps:
    @echo   * Add Windows Classic apps (optional):
    @echo       DISM /Apply-SiloedPackage /ImagePath:W:\ 
    @echo            /PackagePath:"D:\App1.spp" /PackagePath:"D:\App2.spp"  ...
    @echo.
    @echo   * Configure the recovery partition with ApplyRecovery.bat
    @echo.      
    @echo   * Reboot:
    @echo       exit
    @GOTO END
    :FFU
    @echo Starting FFU Deployment
    @echo list disk > x:\listdisks.txt
    @echo exit >> x:\listdisks.txt
    @diskpart /s x:\listdisks.txt
    @del x:\listdisks.txt
    @echo Enter the disk number of the drive where you're going to deploy your FFU (usually 0).
    @SET /P DISKNUMBER=(Enter the Disk Number from above):
    @echo This will remove all data from disk %DISKNUMBER%. Continue?
    @SET /P ERASEALL=(Y or N):
    @if %ERASEALL%.==y. set ERASEALL=Y
    @if %ERASEALL%==Y DISM /apply-ffu /ImageFile=%1 /ApplyDrive:\\.\PhysicalDrive%DISKNUMBER%
    @if not %ERASEALL%==Y GOTO END
    @echo FFU applied. Would you like to configure the recovery partition?
    @SET /P CONFIGRECOVERY=(Y or N):
    @if %CONFIGRECOVERY%.==y. SET CONFIGRECOVERY=Y
    @if %CONFIGRECOVERY%==Y ApplyRecovery.bat
    @if not %CONFIGRECOVERY%==Y GOTO END
    :END
  4. Updates online suchen wegen der Treiber
  5. PC Umbenennen und Domainjoin

 

Fragen

  • Wann sollte ich Snapshots machen um das Image später nochmal einfach ändern zu können?
  • Für Updates reicht es doch 1x/Monat mit DISM das neuste cumulative Update und SSU Update einzuspielen?
  • Was habe ich alles vergessen?

 

Vielen Dank für euren Input.

 

bearbeitet von Busfan
Link zu diesem Kommentar

Moin,

 

Hm, dann klingt das, als sei bei dem Vorgang ein Fehler aufgetreten. Die Wahrscheinlichkeit, dass sowas passiert, erhöht sich natürlich, je häufiger man das durchführt. Insofern könnte man schon von "zu häufig Sysprep" sprechen.

 

Worauf ich hinaus will, ist eine häufig falsche Vorstellung davon, was Sysprep eigentlich macht. Das ist nichts, was ein Windows irgendwie abnutzen würde oder so. Solche Vorstellungen gibt es durchaus, ähnlich wie falsche Vorstellungen von der Registry und sogenannten Cleanern.

 

Gruß, Nils

Link zu diesem Kommentar
Am 5.12.2020 um 08:31 schrieb Busfan:

Wann sollte ich Snapshots machen um das Image später nochmal einfach ändern zu können?

Es bietet sich nach den Windows Updates an, nach der Installation der Anwendungen, nach der Bereinigung des Images und nach dem Sysprep.

 

Am 5.12.2020 um 08:31 schrieb Busfan:

Für Updates reicht es doch 1x/Monat mit DISM das neuste cumulative Update und SSU Update einzuspielen?

Halte ich für übertrieben.


Den Rest konnte ich mir jetzt noch nicht anschauen. 

Link zu diesem Kommentar

Nach dem die Sysprep Frage nun auch geklärt wäre (8x) hier meine Erkenntnisse aus meinem Testlab:

 

1. Image starten > Sysprep.exe > Image anpassen > herunterfahren

2. In VM 2. Disk einbinden mit WinPE und den Deployment Scripts von MS > WinPE Booten

3. Diskpart /s CreatePartitions-UEFI.txt ausführen

4.  ApplyImage.bat <Pfad zum wim File 1 ausführen (Abfragen: Recovery Partition erstellen: Yes; CompactOS:no)

5. Applyrecovery.bat ausführen zum erstellen von WinRE 

 

Im Testlab (Hyper-V dauerte das Image anwenden ca 2 Minuten, auf einem physischen Rechner dauerte es mit SSD 5 Minuten und das Image war oben.

 

Das hilft mir fürs erste in der Praxis mal weiter. Bevor ich in die Firma kam wurden die PCs gar nicht neu deployt und mit all dem vorinstalliertem Crap ausgegeben. Ich habs jetzt eine Zeit lang clean installiert mit einem sauberen W10 ISO

Next Step: MDT

Next Next Step: Windows Autopilot 

Das ist leider alles eine Zeitfrage, und die ist leider fast gar nicht vorhanden....

 

LG
 

Link zu diesem Kommentar
vor einer Stunde schrieb Busfan:

1. Image starten > Sysprep.exe > Image anpassen > herunterfahren

2. In VM 2. Disk einbinden mit WinPE und den Deployment Scripts von MS > WinPE Booten

3. Diskpart /s CreatePartitions-UEFI.txt ausführen

4.  ApplyImage.bat <Pfad zum wim File 1 ausführen (Abfragen: Recovery Partition erstellen: Yes; CompactOS:no)

5. Applyrecovery.bat ausführen zum erstellen von WinRE 

 

Im Testlab (Hyper-V dauerte das Image anwenden ca 2 Minuten, auf einem physischen Rechner dauerte es mit SSD 5 Minuten und das Image war oben.

Gibts einen bestimmten Grund warum du so kompliziert vorgehst? 

Link zu diesem Kommentar
Der letzte Beitrag zu diesem Thema ist mehr als 180 Tage alt. Bitte erstelle einen neuen Beitrag zu Deiner Anfrage!

Schreibe einen Kommentar

Du kannst jetzt antworten und Dich später registrieren. Falls Du bereits ein Mitglied bist, logge Dich jetzt ein.

Gast
Auf dieses Thema antworten...

×   Du hast formatierten Text eingefügt.   Formatierung jetzt entfernen

  Only 75 emoji are allowed.

×   Dein Link wurde automatisch eingebettet.   Einbetten rückgängig machen und als Link darstellen

×   Dein vorheriger Inhalt wurde wiederhergestellt.   Editor-Fenster leeren

×   Du kannst Bilder nicht direkt einfügen. Lade Bilder hoch oder lade sie von einer URL.

×
×
  • Neu erstellen...