Skip to content

Instantly share code, notes, and snippets.

View jgregmac's full-sized avatar

J. Greg Mackinnon jgregmac

View GitHub Profile
#=====================================================================================================
# AUTHOR: J. Greg Mackinnon, Adapted from 1.1 release by Tao Yang
# DATE: 2013-05-21
# Name: SCOMEnhancedEmailNotification.PS1
# Version: 3.0
# COMMENT: SCOM Enhanced Email notification which includes detailed alert information
# Update: 2.0 - 2012-06-30 - Major revision for compatibility with SCOM 2012
# - Cmdlets updated to use 2012 names
# - "Notified" Resolution Status logic removed
# - Snapin Loading and PSDrive Mappings removed (replaced with Module load)
<job id="ZUVMCheckModel">
<script language="VBScript" src="ZTIUtility.vbs"/>
<script language="VBScript">
Option Explicit
RunNewInstance
'//--------------------------------------------------------
'// Main Class
'//--------------------------------------------------------
################################################################################
#
# Create-MDTDriverStructure.ps1
# J. Greg Mackinnon, University of Vermont, 2013-11-11
# Creates a folder structure in the "Out of Box Drivers" branch of a MDT 2013
# deployment share. The structure matches the first two subdirectories of
# the source filesystem defined in $srcRoot. All drivers contained within
# $srcRoot are imported into the deployment share.
#
# Requires:
<# Set-CMDeploymentDeadlines script
J. Greg Mackinnon, 2014-02-07
Updates all existing software update deployments with a new enforcement deadline.
Requires specification of:
-SiteServer (an SCCM Site Server name)
-SiteCode (an SCCM Site Code)
-DeadlineDate
-DeadlineTime
#>
<#
.SYNOPSIS
Migrate-SPUsers Script, by J. Greg Mackinnon (derrived from unattributed script found on the Internet)
Used to document and convert user and group entries in SharePoint from Windows or Claims provider format to a new Claims provider format.
.DESCRIPTION
This script can be executed in two modes:
In "Document" mode (the default), a CSV file will be generated that enumerates all SharePoint users and groups recorded in all SharePoint "webs", and shows the new account details that will be applied.
In "Convert" mode, the changes generated in the CSV files from "Document" mode will be applied.
This two-step process makes it possible to review the planned migration before committing.
.PARAMETER oldProvider
'exchangePrepForThunderbird.vbs script, J. Greg Mackinnon, 2015-10-22
' Kills any running Thunderbird processes, removes the legacy mailbox path prefix,
' sets the imap new mail check interval to 10 minutes, and restarts Thunderbird if
' it was running.
' A backup copy of the userpref.js file is created when the script is run.
' If run silently, Thunderbird will be closed automatically and no message boxes will be displayed.
'
' Usage:
' cscript.exe exchangePrepForThunderbird.vbs [/silent:(True|False)]
'
'addDefaultPrinter script - J. Greg Mackinnon, 2014-06-11
' Adds the network printer specified in the script argument "/share".
' Sets this printer as the default printer for the current user.
option explicit
'Declare Variables
Dim bBadArg,bNoArgs
Dim cScrArgs
Dim iReturn
# Provision-MSOLUsers.ps1 script, by J. Greg Mackinnon, 2014-07-30
# Updated 2014-11-20, new license SKU, corrections to error capture commands, and stronger typing of variables.
# Updated 2014-11-21, added "license options" package to the add license command, for granular service provisioning.
# Updated 2014-12-22, Now provisions student, faculty, and staff Office 365 Pro Plus with different SKUs.
#
# Provisions all active student accounts in Active Directory with an Office 365 ProPlus license.
#
# Requires:
# - PowerShell Module "MSOnline"
# - PowerShell Module "ActiveDirectory"
' // ZUVMUserExit.vbs
' // Custom Function library for use with the Microsoft Deployment Toolkit
' // Currently includes "GenUniComp" - a function for generating unique computer names
' code adapted from source content:
' http://blogs.technet.com/benhunter/archive/2007/03/17/understanding-bdd-rule-processing.aspx
Function UserExit(sType, sWhen, sDetail, bSkip)
UserExit = Success
End Function
# From: http://blog.coretech.dk/kea/automate-importing-and-creating-drivers-packages-in-sccm-2012-r2/
# Imports drivers into SCCM from the directory specified in $sourceDir
# Creates driver packages in the directory specified in $packageDir
# The script does not use any MS-provided Configuration Manager PowerShell cmdlets, nor does it use any Configuration Manager DLL files/assemblies.
# It's all implemented in WMI, which is good because it bypasses several bugs in SCCM 2012 R2 CU3 that were preventing this process from working when we tried it with the CM PowerShell cmdlets!
# Drivers will be grouped into Administrative Categories and corresponding Driver Packages based on the folder structure of $sourceDir:
# root