Jump to content

OSBuilder - A PowerShell Module for Automating Windows 10 Offline Servicing


Recommended Posts

Posted

This new PowerShell module from David Segura looks amazing!

 

Website / Download (Install-Module -Name OSBuilder) / Getting Started

 

OSBuilder is a PowerShell module to help you perform Offline Servicing to a Windows Operating System Image. By using an Offline method of configuring an Operating System, it can then be imported in MDT or SCCM and used like any other OS Deployment. This includes being able to use in an Upgrade Task Sequence, which you cannot do with a Captured Image.

 

The main difference between OSBuilder and other scripted methods for Servicing a Windows Image Offline is that OSBuilder creates a prompted answer file called a Task (think Task Sequence). Since the Task has all the information it needs to update the Windows Image, there is no interaction necessary, and as long as the content (updates) are updated regularly, the Task can be repeated as needed.

 

Since the configuration is also saved in a Task, it is possible to select multiple tasks to run, and they will execute one right after another. This makes performing a monthly update take a few minutes to kick off. After a few hours, everything will be complete!

 

Features

With OSBuilder, you will be able to perform the following:

 

  • Create an OSMedia Library
  • Create a custom OS Build and perform the following Offline
    • Apply Servicing Stack Updates
    • Apply Cumulative Updates
    • Perform Image Cleanup
    • Enable DotNet 3.5
    • Remove Appx Packages
    • Remove Windows Capabilities
    • Enable Windows Features
    • Disable Windows Features
    • Install Language Packs
    • Install Packages
    • Inject Drivers
    • Add Extra Files
    • Apply a Start Layout Modification
    • Apply a Windows Unattend.xml

    [*]Customize WinPE and WinRE

    • Apply Servicing Stack Updates
    • Apply Cumulative Updates
    • Perform Image Cleanup
    • Apply DaRT
    • Inject Drivers

    [*]Create Update Tasks

    [*]Execute Multiple Update Tasks without interaction

 

Installation

OSBuilder is published in the PowerShell Gallery at https://www.powershellgallery.com/packages/OSBuilder/

 

Make sure you check for updates as needed to support new features and to fix bugs!

 

Installation of OSBuilder is through a PowerShell command line. Use the following to Uninstall previous versions and to install the latest version.

 

PowerShell Uninstall Previous Versions:

Uninstall-Module -Name OSBuilder -AllVersions -Force

 

PowerShell Install Latest Version:

Install-Module -Name OSBuilder -Scope CurrentUser

 

Getting Started

I recommend running OSBuilder in PowerShell ISE (as Administrator) until you get familiar with the steps. The first step of using OSBuilder is to run Get-OSBuilder.

 

Hardware Requirements

Offline Servicing of Windows 10 can take a considerable amount of time, especially on older releases. The process of Mounting a WIM, Applying a Cumulative Update, and performing DISM Image Cleanup will take as little as 30 minutes (1803 x86) on a healthy Intel Core i7 computer with a SSD, to almost 2 hours (1607 x64) on the same system.

I strongly recommend using a Workstation class system in performing these updates.

 

Since OSBuilder will mount Windows Images, I strongly recommend that you do not have any running Anti-Virus scanning files ON ACCESS. McAfee will prevent the dismounting of images properly.

 

Work with OSBuilder in a clean Virtual Machine (with 4 Cores and 16GB of RAM minimum) or a stand alone Workgroup Computer

 

Admin Rights

OSBuilder requires Admin Rights in PowerShell as you will be manipulating Windows Images. Make sure you launch PowerShell ISE as Administrator when using OSBuilder

  • Thanks 4
Posted
Thanks @Arthur; this looks very helpful. I'm still using your CandyCrusher script - which order would you recommend running the processes in? Or is there some funky way of combining them?
Posted
which order would you recommend running the processes in? Or is there some funky way of combining them?

In theory OSBuilder should be able to do everything except modify the default user profile.

 

I'm going to have a play with it myself to see exactly what is and isn't possible. :)

  • Thanks 1
  • 4 months later...
Posted

I've just started with this and it was all going so well until I ran the 'Update-OSMedia' command and got an error telling me to import-media first (which I had done).

 

PS C:\WINDOWS\system32> Update-OSMedia -DownloadUpdates -Execute===========================================================================Update-OSMedia===========================================================================WARNING: OSMedia content not found. Use Import-OSMedia to import an Operating System first . . . Exiting!PS C:\WINDOWS\system32>

 

No idea what I'm doing wrong - nothing on the website to help either.

Posted
I'm just getting an error saying "No match was found for the specified search criteria and module name 'OSBuilder'." when trying to run Install-Module -Name OSBuilder -Scope CurrentUser -Force
Posted
I'm just getting an error saying "No match was found for the specified search criteria and module name 'OSBuilder'." when trying to run Install-Module -Name OSBuilder -Scope CurrentUser -Force

I have had that message before and it was due to PowerShell not being able to connect through our proxy server/web filter.

 

Do you have a proxy?

Posted
I have had that message before and it was due to PowerShell not being able to connect through our proxy server/web filter.

 

Do you have a proxy?

 

Yep, kind of figured it was something to do with proxy. Now this fun begins...

Posted
Sorted it, just stuck this before the Install-Module
[b][system.Net.WebRequest]::DefaultWebProxy.Credentials =  [system.Net.CredentialCache]::DefaultCredentials[/b]

  • Thanks 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...