Skip to content

Instantly share code, notes, and snippets.

Get-ChildItem -Path C:\ISO *.iso -Recurse | ForEach-Object {Mount-DiskImage -ImagePath $_.FullName}
Import-OSMedia
Install-Module -Name OSBuilder -Scope CurrentUser
Import-Module -Name OSBuilder
#Windows 10 x64 1809
Write-Host "Windows 10 x64 1809" -ForegroundColor Cyan
Measure-Command {
Mount-WindowsImage -Path "C:\DEV\Optimize\Mount" `
-ImagePath "C:\DEV\Optimize\1809.wim" `
-Index 1 | Out-Null
}
Dismount-WindowsImage -Path "C:\DEV\Optimize\Mount" -Discard | Out-Null
#Windows 10 x64 1809 Optimize
@OSDeploy
OSDeploy / New-OSBUpdate20181206.ps1
Last active December 6, 2018 08:20
18.12.6 1809 Servicing Stack and Cumulative Update
#Paste this in PowerShell to add the new Servicing Stacks and Cumulative Updates
#Servicing Stacks
#https://portal.msrc.microsoft.com/en-us/security-guidance/advisory/ADV990001
#https://support.microsoft.com/en-us/help/4470788/servicing-stack-update-for-windows-10
New-OSBUpdate -Category Servicing -KBNumber 4470788 -OS "Windows 10" -OSArch x64 -OSBuild 1809 -ReleaseDay 04 -ReleaseMonth 12 -ReleaseYear 2018 -URL http://download.windowsupdate.com/d/msdownload/update/software/secu/2018/11/windows10.0-kb4470788-x64_76f112f2b02b1716cdc0cab6c40f73764759cb0d.msu
New-OSBUpdate -Category Servicing -KBNumber 4470788 -OS "Windows 10" -OSArch x86 -OSBuild 1809 -ReleaseDay 04 -ReleaseMonth 12 -ReleaseYear 2018 -URL http://download.windowsupdate.com/c/msdownload/update/software/secu/2018/11/windows10.0-kb4470788-x86_4073458a480724d1f027856e79c09b82553c6c7f.msu
New-OSBUpdate -Category Servicing -KBNumber 4470788 -OS "Windows Server 2019" -OSArch x64 -OSBuild 1809 -ReleaseDay 04 -ReleaseMonth 12 -ReleaseYear 2018 -URL http:
{
"TaskName": "OSBuild Scripts Test",
"TaskVersion": "18.12.12.0",
"TaskType": "OSBuild",
"MediaName": "Win10 Ent x64 1809 17763.168",
"BuildName": "",
"AddFeatureOnDemand": null,
"AddLanguageFeature": null,
"AddLanguageInterfacePack": null,
"AddLanguagePack": null,
# David Segura
# http://osdeploy.com
#
# OSBuilder Script
# Remove-OneDriveSetup.ps1
#======================================================================================
# Remove Files
#======================================================================================
if (Test-Path "$MountDirectory\Users\Default\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\OneDrive.lnk") {
# David Segura
# http://osdeploy.com
#
# OSBuilder Script
# Add-DesktopIcons.ps1
#======================================================================================
# Load Registry Hives
#======================================================================================
$RegDefault = "$MountDirectory\Windows\System32\Config\Default"
@OSDeploy
OSDeploy / WinPE WFP Dlls.inf
Created December 19, 2018 04:20
Adds WPF Dlls to WinPE
;===============================================================
; David Segura
; https://www.osdeploy.com
; WinPE WPF Dlls.inf
; ================== Purpose ===================================
; Restores WPF Functionality in WinPE 10 1809
; ================== Requires ==================================
; Win32\BPC47Langs.dll, Win32\BPC47mm.dll
; Win64\BPC47Langs.dll, Win64\BPC47mm.dll
; ================== Compatibility =============================
@OSDeploy
OSDeploy / ExampleSessions.ps1
Created January 10, 2019 06:03
Quick introduction to Sessions.xml
#Sessions PowerShell ISE GridView
[xml]$XmlDocument = Get-Content -Path "$env:WinDir\servicing\Sessions\Sessions.xml"
$XmlDocument.Sessions.Session.Tasks.Phase.package | Out-GridView
#Cumulative Updates
$XmlDocument.Sessions.Session.Tasks.Phase.package | `
Where-Object {$_.id -like "*RollupFix*" -and $_.targetState -eq 'Installed'} | `
Sort-Object id
@OSDeploy
OSDeploy / Windows 10 x64 1809 Add-CapabilityRSAT.ps1
Last active April 8, 2019 08:41
OSBuilder PowerShell script for adding RSAT. Requires IsoExtract Content Windows 10 1809 FOD x64
# David Segura
# http://osdeploy.com
#
# OSBuilder Script
# Windows 10 x64 1809 Add-CapabilityRSAT.ps1
# Version 19.1.23
# https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/features-on-demand-non-language-fod
#======================================================================================
$FODContent = "$OSBuilderContent\IsoExtract\Windows 10 1809 FOD x64"
$CurrentLog = "$Info\logs\$((Get-Date).ToString('yyyy-MM-dd-HHmmss'))-RSAT.log"