Skip to content

Instantly share code, notes, and snippets.

Brian Scholer briantist

Block or report user

Report or block briantist

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
View z
This file has been truncated, but you can view the full file.
aa
aah
aal
aalii
aardvark
aardvarks
aardwolf
aardwolves
aargh
View Validate-MandatoryOptionalParameters.ps1
<#
.SYNOPSIS
Checks parameters of a specific command for parameters that should have a value but are not Mandatory.
.DESCRIPTION
If a parameter is not marked as Mandatory but the intention is for a value to be supplied, this function
will look for an alias that begins with the string "Required_". If such an alias is found and the
parameter is not bound, this function will throw an exception or set a breakpoint depending on the
options supplied.
@briantist
briantist / Replace-Using.ps1
Last active Apr 10, 2017
Manual substitution of $Using variables with serialized versions for embedding in DSC Script resources
View Replace-Using.ps1
function Replace-Using {
[CmdletBinding(DefaultParameterSetName = 'AsString')]
[OutputType([String], ParameterSetName = 'AsString')]
[OutputType([ScriptBlock], ParameterSetName = 'AsScriptBlock')]
param(
[Parameter(
Mandatory,
ValueFromPipeline
)]
[String]
@briantist
briantist / InstallWindowsManagementFramework.vbs
Last active Nov 23, 2018
Install Windows Management Framework core package
View InstallWindowsManagementFramework.vbs
Set updateSession = CreateObject("Microsoft.Update.Session")
Set updateSearcher = updateSession.CreateupdateSearcher()
Set searchResult = updateSearcher.Search("IsInstalled=0 and Type='Software'")
Set toDL = CreateObject("Microsoft.Update.UpdateColl")
For I = 0 To searchResult.Updates.Count-1
Set update = searchResult.Updates.Item(I)
For kbidindex = 0 to update.KBArticleIDs.Count-1
@briantist
briantist / fixutdates.rb
Created Sep 11, 2012
Fixes incorrect Added On and Completed On dates in uTorrent.
View fixutdates.rb
#############################
# fixutdates.rb
# Fixes uTorrent added on / completed on dates
#
# by Brian Scholer
# http://www.briantist.com/
#
#############################
require 'rubygems'
You can’t perform that action at this time.