Skip to content

Instantly share code, notes, and snippets.

View jgregmac's full-sized avatar

J. Greg Mackinnon jgregmac

View GitHub Profile
# Update-DriverInjectionTaskSequence:
# Created 2015-02-19, by J. Greg Mackinnon
# Updated 2015-03-12 - Added ability to update an existing, full OS installation Task Sequence.
# - Also removes pre-existing "AutoApplyDrivers" step.
# Script will update the SCCM Task Sequence named in the mandatory $name parameter. It will add conditional
# driver package application steps. One step will be generated for each supported OS/model combination.
# If a driver cannot be found for a "higher level" OS (i.e. Windows 8), the script will attempt to locate
# a "lower level" OS driver package for that model instead (i.e. Windows 7).
# Additionally, supported "peripheral" drivers will be installed for all systems.
# UVM Configuraiton Manager Module
# Functions use "SMS" prefix to avoid collision with Microsoft Configuration Manager cmdlets (which use "CM" prefix).
#History:
# 2015-02-19 - Created, added SMSProviderNamespace and SMSObject, SMSFullObject, and SMSClass cmdlets.
# 2015-03-12 - Added SMSSiteNamespace and Add/Get/Remove/Test SMSTSStep cmdlets. Bug fixes.
Set-PSDebug -Strict
function Add-SMSTSStep {
param (
<job id="zUVMDetectDriverPackage">
<script language="VBScript" src="ZTIUtility.vbs"/>
<script language="VBScript">
Option Explicit
RunNewInstance
'//--------------------------------------------------------
'// Main Class
'//--------------------------------------------------------
# Build-UDIInfoFiles.ps1
# J. Greg Mackinnon, 2015-01-03
# Builds two files to be used by the zUVMDetectDriverPackage.wsf script that runs in WinPE during ZTI/UDI client installations.
# YOU MUST ALSO RUN "build-UDIImageList.ps1" to ensure that the images in the UDI Wizard are identical to the images used by the zUVMSetDriverCategories script.
# YOU MUST run this script after each run of the ImportDrivers.ps1 script.
# These are CSV files contain the following information gathered from Configuration Manager:
# - a list of all current OS Images and a matching text string to indicate the major OS version.
# - a list Driver Categories names, with matching Driver Category IDs.
# Requires: Configuration Manager administration tools (including CM PowerShell), and access to the SCCM server using WMI.
# Update $outFile to change the output file names ($outFile is defined twice in the script, rather unprofessionally, really).
# build-UDIImageList.ps1
# J. Greg Mackinnon
# Created: 2015-01-26
# Updated: 2015-03-17 - Added host output to indicate task progress.
# Populates the UDI Configuration Wizard XML file with all Operating System images gathered from
# Configuration Manager.
# Requires: a local installation of the Configuration Manager administration tools.
# Modify $udiXmlIn, $udiXmlOut, $CMSiteCode, and $CMBinPath to match your environment.
[string] $udiXmlIn = 'O:\sources\os\mdt\files\Scripts\UDIWizard_Config.xml'
# Update-OSApplyTaskSequence:
# Created 2015-03-09, by J. Greg Mackinnon
# Updated 2015-03-12 - Added ability to update an existing, full OS installation Task Sequence.
# - Also removes pre-existing "Apply Apply Operating System Image " step.
# Script will update the SCCM Task Sequence named in the $TSPackageName variable with a conditional
# "Apply OS Image" step for each OS currently defined in SCCM.
# Why? Because unless all of your OS images are contained within a single WIM file, the SCCM deployment
# sequence will ignore any OS Image selection that you make in UDI. Instead, we will have to rely on
# build-UDIImageList.ps1
# J. Greg Mackinnon
# Created: 2015-01-26
# Updated: 2015-03-17 - Added host output to indicate task progress.
# Populates the UDI Configuration Wizard XML file with all Operating System images gathered from
# Configuration Manager.
# Requires: a local installation of the Configuration Manager administration tools.
# Modify $udiXmlIn, $udiXmlOut, $CMSiteCode, and $CMBinPath to match your environment.
[string] $udiXmlIn = 'O:\sources\os\mdt\files\Scripts\UDIWizard_Config.xml'
#findUserPermissions.ps1
#J. Greg Mackinnon, 2015-03-25
#
#Recurses though the web application provided in -webAppplication for the users (samaccountname format) provided in -Users,
#for the domain provided in -Domain.
#
# Requires: Microsoft.SharePoint.PowerShell PSSnapin
# ActiveDirectory PowerShell module
#
# Provides: Comma-separated value file with user, permission, and site data for all discovered permissions,