Optimize-Offline Guide - Windows Debloating Tool, Windows 1803, 1903, 19H2, 1909, 20H1 and LTSC 2019

Discussion in 'Windows 10' started by KedarWolf, Jul 30, 2019.

  1. drew84

    drew84 MDL Expert

    Mar 13, 2014
    1,354
    2,308
    60
    perseverance and patience is what is needed

    Ran a test using your source iso - consumer edition .1110
    Code:
    ***************************************************************************************************
    Running Module : Optimize-Offline 4.0.1.8
    Optimize Start : 08/02/2021 01:17:03 PM
    Identity Name  : W0LF
    Computer Name  : DESKTOP-XXXXXXX
    ***************************************************************************************************
    
    2021-08-02T13:17:03 [INFO]: Supported Image Build: [19041] <<--- Base Build <-> Optimized Image Build Professional_19043.iso
    2021-08-02T13:17:06 [INFO]: Mounting Windows 10 Pro
    2021-08-02T13:18:12 [INFO]: Pre-Optimization Image Health State: [Healthy]
    2021-08-02T13:18:19 [INFO]: Removing Provisioned App Package: CortanaApp.View.App
    2021-08-02T13:18:22 [INFO]: Removing Provisioned App Package: Microsoft.GetHelp
    2021-08-02T13:18:25 [INFO]: Removing Provisioned App Package: Microsoft.Getstarted
    2021-08-02T13:18:28 [INFO]: Removing Provisioned App Package: Microsoft.Microsoft3DViewer
    2021-08-02T13:18:32 [INFO]: Removing Provisioned App Package: Microsoft.MicrosoftOfficeHub
    2021-08-02T13:18:35 [INFO]: Removing Provisioned App Package: Microsoft.MicrosoftSolitaireCollection
    2021-08-02T13:18:38 [INFO]: Removing Provisioned App Package: Microsoft.MicrosoftStickyNotes
    2021-08-02T13:18:42 [INFO]: Removing Provisioned App Package: Microsoft.MixedReality.Portal
    2021-08-02T13:18:45 [INFO]: Removing Provisioned App Package: Microsoft.MSPaint
    2021-08-02T13:18:48 [INFO]: Removing Provisioned App Package: Microsoft.Office.OneNote
    2021-08-02T13:18:52 [INFO]: Removing Provisioned App Package: Microsoft.People
    2021-08-02T13:18:55 [INFO]: Removing Provisioned App Package: Microsoft.SkypeApp
    2021-08-02T13:18:59 [INFO]: Removing Provisioned App Package: Microsoft.Windows.Photos
    2021-08-02T13:19:02 [INFO]: Removing Provisioned App Package: Microsoft.WindowsAlarms
    2021-08-02T13:19:05 [INFO]: Removing Provisioned App Package: Microsoft.WindowsCalculator
    2021-08-02T13:19:08 [INFO]: Removing Provisioned App Package: Microsoft.WindowsCamera
    2021-08-02T13:19:12 [INFO]: Removing Provisioned App Package: microsoft.windowscommunicationsapps
    2021-08-02T13:19:16 [INFO]: Removing Provisioned App Package: Microsoft.WindowsMaps
    2021-08-02T13:19:19 [INFO]: Removing Provisioned App Package: Microsoft.WindowsSoundRecorder
    2021-08-02T13:19:23 [INFO]: Removing Provisioned App Package: Microsoft.YourPhone
    2021-08-02T13:19:26 [INFO]: Removing Provisioned App Package: Microsoft.ZuneMusic
    2021-08-02T13:19:29 [INFO]: Removing Provisioned App Package: Microsoft.ZuneVideo
    2021-08-02T13:19:39 [INFO]: Removing System App: Microsoft.AAD.BrokerPlugin
    2021-08-02T13:19:41 [INFO]: Removing System App: Microsoft.BioEnrollment
    2021-08-02T13:19:43 [INFO]: Removing System App: Microsoft.ECApp
    2021-08-02T13:19:45 [INFO]: Removing System App: Microsoft.LockApp
    2021-08-02T13:19:47 [INFO]: Removing System App: Microsoft.Win32WebViewHost
    2021-08-02T13:19:49 [INFO]: Removing System App: Microsoft.Windows.AddSuggestedFoldersToLibarayDialog
    2021-08-02T13:19:51 [INFO]: Removing System App: Microsoft.Windows.FileExplorer
    2021-08-02T13:19:53 [INFO]: Removing System App: Microsoft.Windows.FilePicker
    2021-08-02T13:19:55 [INFO]: Removing System App: Microsoft.Windows.ParentalControls
    2021-08-02T13:19:57 [INFO]: Removing System App: Microsoft.Windows.PeopleExperienceHost
    2021-08-02T13:19:59 [INFO]: Removing System App: Microsoft.Windows.SecHealthUI
    2021-08-02T13:20:01 [INFO]: Removing System App: NcsiUwpApp
    2021-08-02T13:20:05 [INFO]: Disabling Services, Drivers and Integration Content for Removed Apps.
    2021-08-02T13:20:12 [INFO]: Removing Windows Biometric Capability Packages.
    2021-08-02T13:20:32 [INFO]: Disabling Optional Feature: Windows-Defender-Default-Definitions
    2021-08-02T13:20:40 [INFO]: Importing Custom App Associations.
    2021-08-02T13:20:44 [INFO]: Removing Windows Capability: App.StepsRecorder
    2021-08-02T13:20:52 [INFO]: Removing Windows Capability: App.Support.QuickAssist
    2021-08-02T13:21:00 [INFO]: Removing Windows Capability: MathRecognizer
    2021-08-02T13:21:07 [INFO]: Removing Windows Capability: Media.WindowsMediaPlayer
    2021-08-02T13:21:17 [INFO]: Removing Windows Capability: Microsoft.Windows.WordPad
    2021-08-02T13:21:25 [INFO]: Removing Windows Capability: OneCoreUAP.OneSync
    2021-08-02T13:21:33 [INFO]: Removing Windows Capability: OpenSSH.Client
    2021-08-02T13:21:45 [INFO]: Disabling Optional Feature: MicrosoftWindowsPowerShellV2Root
    2021-08-02T13:21:51 [INFO]: Disabling Optional Feature: MSRDC-Infrastructure
    2021-08-02T13:21:54 [INFO]: Disabling Optional Feature: Printing-XPSServices-Features
    2021-08-02T13:21:57 [INFO]: Disabling Optional Feature: SearchEngine-Client-Package
    2021-08-02T13:22:01 [INFO]: Disabling Optional Feature: SmbDirect
    2021-08-02T13:22:04 [INFO]: Disabling Optional Feature: WorkFolders-Client
    2021-08-02T13:22:10 [INFO]: Enabling Optional Feature: DirectPlay
    2021-08-02T13:22:14 [INFO]: Enabling Optional Feature: LegacyComponents
    2021-08-02T13:22:17 [INFO]: Enabling Optional Feature: Microsoft-Windows-Subsystem-Linux
    2021-08-02T13:22:28 [INFO]: Integrating the Microsoft Edge Chromium Application Package.
    2021-08-02T13:22:33 [INFO]: Integrating the Microsoft Edge Administrative Policy Templates.
    2021-08-02T13:22:37 [INFO]: Integrating the Win32 Calculator.
    2021-08-02T13:22:42 [INFO]: Applying Optimized Registry Settings.
    2021-08-02T13:22:58 [INFO]: Applying Setup Content.
    2021-08-02T13:23:02 [INFO]: Importing Registry Template: Additional Tweaks.reg
    2021-08-02T13:23:08 [INFO]: Cleaning-up the Start Menu Layout.
    2021-08-02T13:23:11 [INFO]: Disabling automatic driver update
    2021-08-02T13:23:14 [INFO]: Creating a Package Summary Log.
    2021-08-02T13:23:19 [INFO]: Post-Optimization Image Health State: [Healthy]
    2021-08-02T13:23:22 [INFO]: Saving and Dismounting Windows 10 Pro
    2021-08-02T13:24:58 [INFO]: Rebuilding and Exporting Windows 10 Pro using Maximum compression.
    2021-08-02T13:25:21 [INFO]: Optimizing the Installation Media File Structure.
    2021-08-02T13:25:22 [INFO]: Creating a No-Prompt Bootable Windows Installation Media ISO.
    2021-08-02T13:25:37 [INFO]: Finalizing Optimizations.
    2021-08-02T13:25:37 [INFO]: Optimize-Offline completed in [9] minutes with [1] errors.
    
    ***************************************************************************************************
    Optimizations Finalized : 08/02/2021 01:25:37 PM
    ***************************************************************************************************
    

    ERROR
    ... if I were to hazzard a guess - 1. Different name (Edge Stable) 2. Already Integrated, no need to use parameter "MicrosoftEdge": true,
    @gdeliana may be able to offer a better (more accurate) explanation
     
  2. ashish1989

    ashish1989 MDL Senior Member

    Sep 20, 2013
    357
    30
    10
    What to do now in case of this powershell error
     
  3. gdeliana

    gdeliana MDL Senior Member

    Oct 2, 2010
    365
    419
    10
    Well i already did that in my script, mate, really check if things are OK in the poweshell environment, maybe some caching of some sort is keeping the old code.
     
  4. gdeliana

    gdeliana MDL Senior Member

    Oct 2, 2010
    365
    419
    10
    Hello everyone,

    Again made some batch of updates to the script and here are the changes with explanations:

    • Packages blacklist & whitelist, you can as ususal use the populateLists parameter to as well populate ./TemplateLists/Packages.json and cherry pick your packages
    • Dormant OneDrive - makes Onedrive not start at startup and as well not update. Thanks to @spanishfly for the code
    • OSCDIMG method default for ISO creation. The powershell iso creator was not working for me, so i made the OSCDIMG method the default one. Now you can put the OSCDIMG.exe in the root directory of OO tool or you can install WADK tools. But for those lazy like me that don't want the entire WADK installed, is just enough to copy OSCDIMG.exe to the root folder. I will not provide this executable as it is Microsoft property. Google is your friend :)
     
  5. KedarWolf

    KedarWolf MDL Addicted

    Mar 17, 2016
    977
    870
    30
    Can you explain more clearly.

    I tried editing the packages.json and having "Packages": true, and "Packages": "Whitelist", and get the below.

    Code:
    At D:\Optimize-Offline-master\Optimize-Offline-master\Start-Optimize.ps1:54 char:32
    +     $ContentJSON = $ContentJSON | ConvertFrom-Json
    +                                   ~~~~~~~~~~~~~~~~
        + CategoryInfo          : NotSpecified: (:) [ConvertFrom-Json], ArgumentException
        + FullyQualifiedErrorId : System.ArgumentException,Microsoft.PowerShell.Commands.ConvertFromJsonCommand
    
    Optimize-Offline : A parameter cannot be found that matches parameter name 'PSPath'.
    At D:\Optimize-Offline-master\Optimize-Offline-master\Start-Optimize.ps1:122 char:18
    + Optimize-Offline @ConfigParams
    +                  ~~~~~~~~~~~~~
        + CategoryInfo          : InvalidArgument: (:) [Optimize-Offline], ParameterBindingException
        + FullyQualifiedErrorId : NamedParameterNotFound,Optimize-Offline
    Here is my configuration.json.

    Code:
    {
      "_Info": [
        "This is a JSON based Configuration file for Optimize-Offline.",
        "Ensure proper formatting is used when editing the JSON parameter values.",
        "Boolean parameter values use true and false. String parameter values must be enclosed in double-quotes."
      ],
      "SourcePath": "D:\\1\\"19044.1151.210724-1310.21H2_RELEASE_SVC_PROD3_CLIENT_X64FRE.iso",
      "WindowsApps": "Whitelist",
      "SystemApps": "Whitelist",
      "Capabilities": "Whitelist",
      "Packages": true,
      "FeaturesToEnable": "List",
      "FeaturesToDisable": "List",
      "DeveloperMode": false,
      "WindowsStore": false,
      "MicrosoftEdge": false,
      "Win32Calc": true,
      "Dedup": false,
      "DaRT": [],
      "Registry": true,
      "Additional": {
        "Setup": true,
        "Wallpaper": false,
        "SystemLogo": false,
        "LockScreen": false,
        "RegistryTemplates": true,
        "LayoutModification": false,
        "Unattend": true,
        "Drivers": true,
        "NetFx3": true
      },
      "ComponentCleanup": true,
      "ISO": "No-Prompt",
      "CompressionType": "Solid",
      "SelectiveRegistry": {
        "DisableWindowsUpdate": false,
        "DisableDriverUpdate": true
        "DormantOneDrive": true
      }
    }
    
     
  6. gdeliana

    gdeliana MDL Senior Member

    Oct 2, 2010
    365
    419
    10
    Sorry it's fixed now, the usual branch merging typos.
     
  7. gdeliana

    gdeliana MDL Senior Member

    Oct 2, 2010
    365
    419
    10
    I haven't modified anything related to Edge integration. However Edge integration will work only on 19041 images without edge inside. I think this feature is redundant since Microsoft is already since a year ago including the Edge Chromium by default.

    However the above error, means that the script is not able to find the Edge Chromium package in the ./Packages/MicrosoftEdge directory.
     
  8. ashish1989

    ashish1989 MDL Senior Member

    Sep 20, 2013
    357
    30
    10
    In github it is still showing v4.0.1.8
     
  9. drew84

    drew84 MDL Expert

    Mar 13, 2014
    1,354
    2,308
    60
  10. drew84

    drew84 MDL Expert

    Mar 13, 2014
    1,354
    2,308
    60
    Same?.. which one, you've mentioned a number of them here
    If it's the EdgeC issue that I mentioned it has been explained by @gdeliana here, and as suggested previously, change Edge parameter to 'false'
     
  11. zbigniew59

    zbigniew59 MDL Senior Member

    May 14, 2016
    374
    171
    10
    You have to be patient with you - after all - we want to help you.
     
  12. zbigniew59

    zbigniew59 MDL Senior Member

    May 14, 2016
    374
    171
    10
    You tried - MY - I gave you a link.
     
  13. ashish1989

    ashish1989 MDL Senior Member

    Sep 20, 2013
    357
    30
    10
    No, I will try it now
     
  14. drew84

    drew84 MDL Expert

    Mar 13, 2014
    1,354
    2,308
    60
  15. KedarWolf

    KedarWolf MDL Addicted

    Mar 17, 2016
    977
    870
    30
    Can you update the ReadMe on GitHub with this info, please?