Skip to content

Instantly share code, notes, and snippets.

View RamblingCookieMonster's full-sized avatar

Warren Frame RamblingCookieMonster

View GitHub Profile
RamblingCookieMonster /
Last active November 13, 2016 05:05
PowerShell User Groups Example List

What is this?

A simple example illustrating how to collect a centralized list of PowerShell user groups


Keith asked if there were a list of PowerShell user groups. There is not.

What about...

RamblingCookieMonster /
Last active June 25, 2016 21:16
Would Tracking PowerShell Sessions be Helpful?

Hi all!

TLDR: Would it be helpful to track PowerShell-related sessions at non-PowerShell events, rather than just tracking PowerShell-related events?

Longer story:

So! Personally, I've found that sessions covering $OtherTechnology through PowerShell fairly helpful.

Folks presenting on how to automate and configure SQL Server, VMware, Azure, Active Directory, and the many other technologies PowerShell can interface with tend to be good folks to learn from.

RamblingCookieMonster /
Last active June 26, 2016 22:47
RamblingCookieMonster / Migrate-ADMTUserCLI.ps1
Last active October 23, 2023 18:06
This is an example function that wraps ADMT.exe, abstracting out migration of Active Directory users into a PowerShell function.
View Migrate-ADMTUserCLI.ps1
This is a PowerShell function wrapping the ADMT executable to abstract out migrating Active Directory users.
Read all the ADMT docs, and all the code and comments below before considering using this : )
The COM object was covered nicely by Jan Egil Ring:
Unfortunately, the COM object does not support Include files, a critical requirement for us.
RamblingCookieMonster / rabbitmq.config
Created July 3, 2015 14:46
View rabbitmq.config
%% -*- mode: erlang -*-
%% ----------------------------------------------------------------------------
%% See for details.
%% ----------------------------------------------------------------------------
%% Network Connectivity
%% ====================
RamblingCookieMonster / PSExcel.HighlightLine.ps1
Last active August 29, 2015 14:24
View PSExcel.HighlightLine.ps1
This code illustrates highlighting a line based on a cell value
Search-CellValue will help identify the rows we care about
Format-Cell will format these rows
Prerequisite: Download and load up PSExcel
# View the help on the primary commands we will be using
Get-Help Search-CellValue -Full
RamblingCookieMonster / Get-EnumValues.ps1
Last active August 29, 2015 14:18
View Get-EnumValues.ps1
function Get-EnumValues {
Return list of names and values for an enumeration object
Return list of names and values for an enumeration object
Pass in an actual type, or a string for the type name.
View Get-UserEnvironment.ps1
Fun trying to determine a current runspaces variables and modules.
In response to thise tweet:
I'm assuming there are a number of issues I'm not considering, this was just a morning distraction.
#This would create a new runspace, get variables, modules, snapins.
#Presumably this changes based on PS version, so need dynamic method to extract it
$StandardUserEnv = [powershell]::create().addscript({
RamblingCookieMonster / Test-Pipeline.ps1
Created December 29, 2014 15:07
Pipeline and ShouldProcess demo
View Test-Pipeline.ps1
This function and following examples illustrate the implementation of two helpful scenarios:
Pipeline input, with verbose output describing the values and types within the Begin, Process, and End blocks
ShouldProcess support, with friendly bypass handling using a Force switch.
Function Test-Pipeline {
RamblingCookieMonster / Get-Secret.ps1
Last active October 6, 2017 17:57
Fun with Thycotic Secret Server
View Get-Secret.ps1
Picked up a trial for Thycotic Secret Server.
Very impressed so far. Simple setup, had a quick and dirty Get-Secret function a few minutes later.
All code here assumes you have configured IIS and Secret Server to allow Windows Authentication, and have enabled web services.
This is quick and dirty, i.e. we don't handle errors, we don't handle varying environments, etc.