Skip to content

Instantly share code, notes, and snippets.

#requires -Version 5
#requires -RunAsAdministrator
<#
.SYNOPSIS
Update Windows ADK
.DESCRIPTION
Will auto update/patch the Windows 10 Version 1703 ADK if installed.
<#
.SYNOPSIS
Generate a computer list from Hyper-V ready to import into Configuration Manager
.DESCRIPTION
Given a Hyper-V server and a set of Hyper-V Virtual Machines, this script will
extract out the necessary information required to create the associated Machine Object in
Configuration Manager.
@keithga
keithga / get-Ignite2017Content.ps1
Last active October 3, 2017 05:22
Download Ignite content
<#
Script to assist finding content to download from MS Ignite 2017
Will use the script Get-IngiteSession.ps1 from: https://gallery.technet.microsoft.com/Ignite-2016-Slidedeck-and-296df316
#>
[cmdletbinding()]
param(
@keithga
keithga / test-switches.ps1
Last active October 10, 2017 05:42
TEst switches
Function Test-Switch ( [switch] $Test ) {
# Correct use of a switch Test (True case)
if ( $test ) {
"Do Something"
}
# Bad use of a switch test (False case)
if ( $test -eq $null ) {
"Never going to do it!"
@keithga
keithga / ZTISelectBootDisk.wsf
Last active October 11, 2017 05:13
Select a disk based on BusType
<job id="ZTISelectBootDisk">
<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
#Requires -Version 3
#requires -RunAsAdministrator
<#
.SYNOPSIS
TPM Infineon Riemann Check
.DESCRIPTION
@keithga
keithga / DeviceCollPerformance1
Created January 26, 2018 05:02
Add-CMDeviceCollectionDirectMembership Slow
<#
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 / Wait-CheckPointTransition.ps1
Last active February 9, 2018 19:54
Wait for Checkpoint Transition
<#
.SYNOPSIS
Monitor Progress for CheckPoint Encryption or Decryption
.DESCRIPTION
This script is designed to Block the task sequence from continuing if Checkpoint
is in the Encrypting or Decrypting phase. Additionally will display a visual
progress percentage using the existing SMS Task Sequencing UI framework.
.NOTES
@keithga
keithga / Unattend.xml
Created December 12, 2017 05:37
Silence is Golden
<!-- 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 / find-StringInWULog.ps1
Last active April 4, 2018 16:53
BLOG: example of how to work arround Get-WindowsUpdateLog console issues in a SCCM Configuration Item
<#
.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.