Skip to content

Instantly share code, notes, and snippets.

keithga

Block or report user

Report or block keithga

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@keithga
keithga / Update-Windows7Images.ps1
Created Mar 14, 2019
Windows 7 Image Factory
View Update-Windows7Images.ps1
#Requires -RunAsAdministrator
<#
.Synopsis
Auto create a VM from your MDT Deployment Media
.DESCRIPTION
Given an MDT Litetouch Deployment Share, this script will enumerate
through all "Offline Media" shares, allow you to select one or more,
and then auto-update and auto-create the Virtual Machine.
View Trace-NetworkwithNetSh.ps1
#Requires -RunAsAdministrator
<#
.Synopsis
Launch network trace
.DESCRIPTION
Launches network trace and displays a
.EXAMPLE
Example of how to use this cmdlet
.NOTES
@keithga
keithga / find-StringInWULog.ps1
Last active Apr 4, 2018
BLOG: example of how to work arround Get-WindowsUpdateLog console issues in a SCCM Configuration Item
View find-StringInWULog.ps1
<#
.SYNOPSIS
Search WindowsUpdate Logs
.DESCRIPTION
Searches the Windows Update Log for a string
.NOTES
Ready to be used within a
Copyright Keith Garner, All rights reserved.
@keithga
keithga / DeviceCollPerformance2
Created Jan 26, 2018
Replacement script for Add-CMDeviceCollectionDirectMembership
View DeviceCollPerformance2
<#
Example of how to create a Device Collection and populate it with computer objects
The Faster way. <Yea!>
#>
[cmdletbinding()]
param(
$CollBaseName = 'MyTestCol_0C_{0:D4}',
@keithga
keithga / DeviceCollPerformance1
Created Jan 26, 2018
Add-CMDeviceCollectionDirectMembership Slow
View DeviceCollPerformance1
<#
Example of how to create a Device Collection and populate it with computer objects
The Slow way. <Yuck>
#>
[cmdletbinding()]
param(
$CollBaseName = 'MyTestCol_03_{0:D4}',
@keithga
keithga / find-DiskHog.ps1
Last active Nov 30, 2018
Disk Hog Script
View find-DiskHog.ps1
<#
.SYNOPSIS
Report on Disk Hogs
.DESCRIPTION
Returns a list of the largest directories in use on the local machine
.NOTES
Copyright Keith Garner, All rights reserved.
Really Updated for Windows 7 and Optimized for !!!SPEED!!!
.PARAMETER Path
Start of the search, usually c:\
@keithga
keithga / Unattend.xml
Created Dec 12, 2017
Silence is Golden
View Unattend.xml
<!-- https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/settings-for-automating-oobe -->
<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend">
<settings pass="specialize">
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<ComputerName>*</ComputerName>
</component>
<component name="Microsoft-Windows-Deployment" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<RunSynchronous>
<RunSynchronousCommand wcm:action="add">
@keithga
keithga / MYIT_OEMBypass.ps1
Last active Nov 30, 2017
IT OEM Bypass script
View MYIT_OEMBypass.ps1
<#
Bypass file for OEM OOBE Setup.
Called from within Audit Mode.
#>
param(
[int] $TargetDisk = 0,
[string] $NewBootWim = "$PSScriptRoot\Generic_x64.wim",
[string] $UserName = 'MDTServer\MDTNonInteractive',
[string] $Password = 'UnSecurePassword1234',
@keithga
keithga / unattend.xml
Last active Nov 30, 2017
Unattend.xml file for bypassing OEM OOBE.
View unattend.xml
<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend">
<settings pass="oobeSystem">
<component name="Microsoft-Windows-Deployment" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Reseal>
<Mode>Audit</Mode>
</Reseal>
</component>
</settings>
View ZTISurface1TBBootDisk.wsf
<job id="ZTISurface1TBBootDisk">
<script language="VBScript" src="ZTIUtility.vbs"/>
<script language="VBScript" src="ZTIDiskUtility.vbs"/>
<script language="VBScript">
' // ***************************************************************************
' //
' // Copyright (c) Microsoft Corporation. All rights reserved.
' //
' // Microsoft Deployment Toolkit Solution Accelerator
You can’t perform that action at this time.