Skip to content

Instantly share code, notes, and snippets.

View cliv's full-sized avatar

Charlie Livingston cliv

View GitHub Profile
@cliv
cliv / gist:5c835c8964715b5f21e2b870bf77d63c
Created July 19, 2022 16:49
Fix AzureAD/MSOnline/Microsoft Graph user with invalid immutableID
# This generally affects users federated to azuread from gsuite who's email address has changed - You'll still have sync errors
# but at least the user can still log in.
# This works in Powershell 7.x on mac as well as windows
# Requires `Install-Module Microsoft.Graph`
# Who are we modifying
$email = "[email protected]"
# Fix the user
@cliv
cliv / CSFalconInstall.sh
Last active June 1, 2021 18:01
Install CS Falcon on MacOS Intel
## Replaced by https://github.com/cliv/cs-falcon-protect-intune
# add to ~/.aws/config and add the path to your folder.
[profile vscode]
region = us-west-2
credential_process = --YOUR $HOME HERE--/.aws/get_credentials_vscode.sh
@cliv
cliv / multirunner
Created April 6, 2018 17:05
Run command on multiple AWS hosts by name
#!/bin/bash
if [ "$#" -ne 3 ]; then
echo "Illegal number of parameters"
echo "Usage: multirunner {profile} {hostspec} {command}"
exit
fi
PROFILE=$1
HOSTSPEC=$2
COMMAND=$3
TEMPFILE="/tmp/awsHosts.txt"
@cliv
cliv / userdata.txt
Created May 27, 2016 22:20
AWS UserData to configure Windows EC2 instance using powershell from S3 Raw
<powershell>
######
# Charlie Livingston <[email protected]>
# MIT Licensed - Do whatever you like with this.
#
# Simple code for a windows machine to grab a set of .ps1 files off of S3 and
# run them locally depengind on how a machine is tagged in EC2
#
# The xml-ish <powershell></powershell> tags in the script make the file invalid powershell to run directly in a machine
# but are required by EC2Config when passed into the instance as userdata