Skip to content

Instantly share code, notes, and snippets.

Logged into org account

Brett Miller brettmillerb

Logged into org account
View GitHub Profile
Jaykul / SubscriptionNameCompleterAttribute.ps1
Last active Sep 14, 2020
Bonus Argument Completers For Azure
View SubscriptionNameCompleterAttribute.ps1
using namespace Microsoft.Azure.Commands.Common.Authentication.Abstractions
using namespace System.Management.Automation.Language
using namespace System.Management.Automation
using namespace System.Collections.Generic
using namespace System.Collections
class SubscriptionNameCompleter : ArgumentCompleterAttribute {
# PowerShell expects you to write IArgumentCompleter and register them with this syntax:
# [ArgumentCompleter([MyIArgumentCompleter])]
View CurrentUserAllHosts.ps1
#region UX config
Import-Module posh-git
if (Get-Module PSReadLine) {
Import-Module oh-my-posh
$ThemeSettings.MyThemesLocation = "~/.config/powershell/oh-my-posh/Themes"
if (Get-Theme | Where-Object Name -eq Sorin-NL) {
Set-Theme Sorin-NL
Jaykul / Connect-WaspRemoteDesktop.ps1
Last active Aug 14, 2020
Using WASP to remote desktop, for those ocassions when policy blocks you ...
View Connect-WaspRemoteDesktop.ps1
Connects to remote desktop using the specified credentials by automating UI input using WASP
Requires the WASP (Windows Automation Scripting in PowerShell) module to be installed.
This script is a workaround for environments where GPOs don't allow saving credentials,
but we only have the credentials via an API from PowerShell.
... hey, it's better than exposing the plain text in a browser and copy-pasting via the clipboard!

Changes to my Mac

Turn off "press and hold" for foreign letters, allowing you to then press and hold for repeat letters. Open Terminal and run:

defaults write NSGlobalDomain ApplePressAndHoldEnabled -bool false

Then you need to close/reopen any app before it takes effect.

Make the dock appear faster when using auto hide:

View Build.ps1
param (
$SourceFolder = $PSScriptRoot
if (-not (Get-Module PSDepend -ListAvailable)) {
Install-Module PSDepend -Repository (Get-PSRepository)[0].Name -Scope CurrentUser
Push-Location $PSScriptRoot -StackName BuildScript
Invoke-PSDepend -Path $SourceFolder -Confirm:$false
View RDCCreator.ps1
using assembly System.Xml.Linq
using namespace System.Xml.Linq
function RdcDocument {
param (
[Parameter(Mandatory, Position = 1)]
[Parameter(Mandatory, Position = 2)]

A small collection specialised scripts for Active Directory.


  • Compare-ADMemberOf
  • Get-ADSystemInfo
  • Get-GroupMemberTree
  • Get-LdapObject
  • Get-MemberOfTree
  • Test-LdapSslConnection
indented-automation / New-Password.ps1
Last active Apr 8, 2021
PowerShell random password generator.
View New-Password.ps1
function New-Password {
Generate a random password.
Generate a random password.
Change log:
27/11/2017 - faustonascimento - Swapped Get-Random for System.Random.
Swapped Sort-Object for Fisher-Yates shuffle.
jasonjoh /
Last active Jun 7, 2021
A sample Python script that sends an actionable message via the Office 365 SMTP server.
#! /usr/local/bin/python
"""Sends an actionable message to yourself
Usage: ' -u <username> -p <password>'
import sys
import getopt
from smtplib import SMTP as SMTP
from email.mime.text import MIMEText
View wordlist.txt
acrobat africa alaska albert albino album
alcohol alex alpha amadeus amanda amazon
america analog animal antenna antonio apollo
april aroma artist aspirin athlete atlas
banana bandit banjo bikini bingo bonus
camera canada carbon casino catalog cinema
citizen cobra comet compact complex context
credit critic crystal culture david delta
dialog diploma doctor domino dragon drama