Skip to content

Instantly share code, notes, and snippets.

@jones948
jones948 / Detect_WinRE.ps1
Created January 14, 2023 18:01
Detect Compliance for CVE-2022-41099
#https://msrc.microsoft.com/update-guide/vulnerability/CVE-2022-41099
#Note the CVE article links to the November patches as the fix, but I'm going with the January updates and the patch levels are based on those.
$patched_Win11_22H2 = [version]"10.0.22621.1105"
$patched_Win11_21H2 = [version]"10.0.22000.1455"
$patched_Win10_22H2 = [version]"10.0.19045.2486"
$patched_Win10_21H2 = [version]"10.0.19044.2486"
$patched_Win10_20H2 = [version]"10.0.19042.2486"
$patched_Win10_20H1 = [version]"10.0.19041.2486"
#Get current WinRE .wim location
@jones948
jones948 / Deploy_Winre.ps1
Created January 14, 2023 03:02
Deployment Code for Patching Winre.wim for CVE-2022-41099
# https://msrc.microsoft.com/update-guide/vulnerability/CVE-2022-41099
#Set patched wim location and get its size.
$replacement_wim = "$PSScriptRoot\Winre-patched-11-22H2-max.wim"
$wim_size = Get-ItemProperty -Path $replacement_wim | select-object Length
#Pick some uncommonly used drive letters and set a mount point for the Recovery partition if the letter is not already in use.
$mount_letter = ""
$drive_letters = "L","M","O","Q","R","T","V","W"
$Volumes = Get-Volume | Where-Object {$null -ne $_.DriveLetter} | Select-Object -ExpandProperty DriveLetter
@jones948
jones948 / Win11_HardwareReadiness.ps1
Created March 8, 2022 20:55
Windows 11 Hardware Readiness Script for SCCM OSD
#=============================================================================================================================
# https://techcommunity.microsoft.com/t5/microsoft-endpoint-manager-blog/understanding-readiness-for-windows-11-with-microsoft-endpoint/ba-p/2770866
#
# Script Name: HardwareReadiness.ps1
# Description: Verifies the hardware compliance. Return code 0 for success.
# In case of failure, returns non zero error code along with error message.
# This script is not supported under any Microsoft standard support program or service and is distributed under the MIT license
# Copyright (C) 2021 Microsoft Corporation
@jones948
jones948 / PatchMyPC_Update_TSApplications.ps1
Created August 3, 2021 16:09
Powershell script to swap manually created applications in Task Sequences to those maintained by PatchMyPC.
# Borrowed base script of the app replacement code from: https://www.joseespitia.com/2020/05/08/automatically-update-or-remove-an-application-in-all-of-your-configmgr-task-sequences/
#
# Hashtable of the Application, Old Configuration Manager App Name, New Configuration Manager App Name (Order matters)
$CMPSSuppressFastNotUsedCheck = $true
$app_list = @{
"7-Zip"=('7-Zip','7-Zip 19.00 (MSI-x64)')
"Adobe Reader"=('Adobe Acrobat Reader DC','Adobe Acrobat Reader DC 21.005.20060')
"Dell CommandUpdate"=('Dell CommandUpdate','Dell Command Update 4.2.1')
"FileZilla"=('FileZilla','FileZilla Client 3.55.0 (x64)')
"Google Chrome"=('Google Chrome','Google Chrome 92.0.4515.107 (x64)')