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

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

  1. GodHand

    GodHand MDL Senior Member

    Jul 15, 2016
    490
    653
    10
    Usually it's updated every week to week-and-a-half. I'm not sure how quickly you expect updates but debugging in itself can take quite some time, considering I have to run it on multiple independent images of different editions, apply said images to virtual machines and then put them under various forms of runtime load while auditing logs with my server to ensure things are running as they should be.

    Moreover, I have never just updated due to one specific issue unless that issue is severe. I prefer to update with a handful of fixes that need addressed at once rather than having a new update every other day just for one single 'fix' that does not necessary result in any finalization improvements (i.e. resource function code optimizations).

    As far as the GUI version is concerned - it's been complete for a while; however, its WimgApi and Dism dynamic library (.dll files) C# wrappers have required recent updates which I addressed in another thread last week on here.

    *EDIT*

    Also, I am testing a newer version with 19041.1 (20H1)
     
  2. petok

    petok MDL Member

    May 4, 2009
    217
    104
    10
    I also test script on 19041.1 with latest script (but with modification I no like some option and make customized), before is unsupported arch.
     
  3. GodHand

    GodHand MDL Senior Member

    Jul 15, 2016
    490
    653
    10
    20H1 has a handful of registry and policy related changes as well as layout and some metadata changes. The removal processes of Optimize-Offline run universally across builds, however.
     
  4. petok

    petok MDL Member

    May 4, 2009
    217
    104
    10
    Yes, I know. I change script to work just for remove system appx, bundle appx and disable features - for registry I import custom reg file before starting scripts.

    PS: This is just for idea. I like, if can you remove registry parameters from Optimize-Offline.psm1 and import into other (ex. Tweaks_Optimize.ps1) file be clean and fast edit script. If can to be just Optimize-Offline.psm1 be caller on all other scripts.
     
  5. megaborg

    megaborg MDL Novice

    Nov 14, 2009
    8
    2
    0
    Hi GodHand first off all thanks for your beautiful program which is very useful for me.
    I'd like to know if possible what does it mean:
    Can you explain in a few words how do you do that exactly , since i'm very curious to know your method to ensure thing are running correctly,obviously if you want to share this.
    Thanks again for your script....bye
     
  6. GodHand

    GodHand MDL Senior Member

    Jul 15, 2016
    490
    653
    10
    #286 GodHand, Feb 13, 2020 at 15:44
    Last edited: Feb 13, 2020 at 15:50
    I use a script that utilizes the VirtDisk.dll (a library for VHD management APIs) and WimgApi.dll. It basically creates multiple sparse VHDXs and WimgApi applies multiple images to each. Because I use the native APIs, this can be done in a PE environment, x86 environment, etc. and does not require Hyper-V to be present on the device (nor does one have to use Hyper-V's abysmal cmdlets and GUI). Then they're made bootable, added to a Hyper-V Converged Cluster and controlled with Windows Admin Center. They're basically set up like an independent virtual network infrastructure. Since each has its own isolated NIC/hardware throughput (as well as any shielding/security one may implement), they do everything an independent machine would do that is not connected to a network or server infrastructure, and the actual server itself does nothing other than audit logs using User Right privileges via GPO. Likewise, you can also debug in real time using programs like Visual Studio, etc.

    I also will deploy them over a network using SCCM and the default Windows Server Deployment Services.

    Everything on my Server is virtual. I create virtual machines (many dedicated) to run all databases (SQL and the like) and absolutely nothing from the public internet interacts with the actual hardware of the server or directly with the server. Everything is managed using Failover Clustering or on a Converved Infrastructure which are entirely virtual. The virtual environments themselves can then be monitored and controlled however one sees fit, or whatever is required for the environment one creates.
     
  7. megaborg

    megaborg MDL Novice

    Nov 14, 2009
    8
    2
    0
    Wow,really thanks for your explanation,it's really a long and hard work so thanks again for your program.
     
  8. GodHand

    GodHand MDL Senior Member

    Jul 15, 2016
    490
    653
    10
    It's not really hard work at all to set up a virtual system similar to mine. What can be problematic for some (or, rather, a hindrance) is the cost of the hardware required. Each virtual environment you create requires a specific amount of hardware throughput to run optimally in order to attain accurate data. SQL databases require very little, whereas my Onion router, as well as linking to other networks, can require a significant amount due to the implementation of security features like SSL/TLS and the fact it will be used for constant traffic. As an example, I help host a few very popular Discord bots that are in over 1,000 channels each, and are constantly requesting/updating/returning data to whatever queries it. I can easily log over 500k individual queries in a 12 hour period per bot.

    Conversely, it's not difficult nor is any server-specific grade hardware required for deploying images, creating them or testing them in moderate environments.
     
  9. FlyTech

    FlyTech MDL Novice

    Sep 24, 2009
    13
    0
    0
    Anyone use this script successfully with a Enterprise 17763.1012 LTSC iso. If so, can you point out what I'm doing wrong.
    To start script I have to type./Start-Optimize twice to get it to start. The first attempt always displays this..

    "./Start-Optimize : Cannot bind argument to parameter 'Path' because it is null.
    At line:1 char:1
    + ./Start-Optimize
    + ~~~~~~~~~~~~~~~~
    + CategoryInfo : InvalidOperation: (C:\Optimize\Optimize-Offline.psm1:String) [], RuntimeException
    + FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Resolve-FullPath"

    The second attempt typing ./Start-Optimize always starts the script. Below is my configuration.json selections..


    "SourcePath": "C:\\10\\enterprise_ltsc_2019.iso",
    "WindowsApps": "All",
    "SystemApps": true,
    "Capabilities": true,
    "Packages": true,
    "Features": true,
    "DeveloperMode": false,
    "WindowsStore": false,
    "MicrosoftEdge": false,
    "Win32Calc": false,
    "Dedup": false,
    "Registry": true,
    "Additional": {
    "Setup": false,
    "Wallpaper": false,
    "SystemLogo": false,
    "LockScreen": false,
    "RegistryTemplates": false,
    "Unattend": false,
    "Drivers": false,
    "NetFx3": true
    },
    "ISO": "Prompt"

    I never get the Remove Appx Provisioned Packages grid window to show up no matter what selection I choose, All, Select or Whitelist in the json.
    with the script starting at the Remove System Apps Gridview. After the process of removing my System Apps I selected, the script displays another window which display the following
    Failed to import custom app associations
    The window closes quickly and the script moves on through the
    various selections gridview windows. At the end of the script just right after i choose the compression
    method, it errors out with this message...

    [​IMG]

    Any suggestions greatly appreciated
     

    Attached Files: