Skip to content

Instantly share code, notes, and snippets.

View thedavecarroll's full-sized avatar
🧑‍💻
PowerShell Summit

Dave Carroll thedavecarroll

🧑‍💻
PowerShell Summit
View GitHub Profile
@jdhitsolutions
jdhitsolutions / New-GithubGist.ps1
Last active March 16, 2023 11:53
A PowerShell script to create a new gist on Github.
#requires -version 4.0
Function New-GitHubGist {
[cmdletbinding(SupportsShouldProcess,DefaultParameterSetName = "Content")]
Param(
[Parameter(Position = 0, Mandatory, HelpMessage = "What is the name for your gist?",ValueFromPipelineByPropertyName)]
[ValidateNotNullorEmpty()]
[string]$Name,
@jdhitsolutions
jdhitsolutions / SendTo-Gist.ps1
Last active November 13, 2020 18:06
A PowerShell ISE script to send selected text as a Github gist. This requires my New-GitHubGist function.
#requires -version 4.0
#dot source the script with the New-GitHubGist function
. C:\scripts\New-GitHubGist.ps1
Function SendTo-Gist {
[cmdletbinding()]
Param(
[Parameter(Position = 0)]
[ValidateNotNullorEmpty()]
@AndySchneiderDev-zz
AndySchneiderDev-zz / Update-Schema.ps1
Last active June 19, 2018 18:55
PowerShell to Udpate Active Directory Schema
# This should only be used in a development environment and is for demonstration purposes only
# Use at your own risk
# This adds an attribute to the user class
# Written by Andy Schneider, http://get-powershell.com
Function New-OID {
$Prefix="1.2.840.113556.1.8000.2554"
$GUID=[System.Guid]::NewGuid().ToString()
$Parts=@()
$Parts+=[UInt64]::Parse($guid.SubString(0,4),"AllowHexSpecifier")
@stevenkuhn
stevenkuhn / gist:5062660
Last active March 7, 2023 16:03
This PowerShell script generates release notes for Octopus Deploy that contain the GitHub commits and JIRA issues from the current build to the latest production release. It will also create the Octopus release based on the TeamCity build number.
#
# Assumptions
#
# 1. If you have a Octopus release deployed, say 1.0.0.73, there is a git
# tag set for that commit in GitHub that is "v1.0.0.73".
#
# 2. You have TeamCity label each successful build in GitHub with the format
# "v{build number}. Sidenote: it appears that TeamCity only labels the
# default branch, but not feature branches.
#