Skip to content

Instantly share code, notes, and snippets.

Darren Robinson darrenjrobinson

Block or report user

Report or block darrenjrobinson

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 Get IdentityNow VA Clusters.ps1
# IdentityNow Orgname
$orgName = "yourOrgName"
# IdentityNow Admin User
$adminUSR = [string]"YourAdminAccount".ToLower()
$adminPWDClear = 'yourAdminPassword'
# Generate the password hash
# Requires Get-Hash from PowerShell Community Extensions (PSCX) Module
# https://www.powershellgallery.com/packages/Pscx/3.2.2
@darrenjrobinson
darrenjrobinson / import.ps1
Last active Aug 29, 2019
Microsoft Identity Manager Granfeldt PowerShell MA Workday Import Script (Multi-Threaded). Associated blogpost https://blog.darrenjrobinson.com/multi-threading-granfeldt-powershell-management-agent-imports/
View import.ps1
param (
[string]$Username,
[string]$Password,
$Credentials,
$OperationType,
[bool] $usepagedimport,
$pagesize
)
$pwd = ConvertTo-SecureString $Password -AsPlainText -Force
@darrenjrobinson
darrenjrobinson / ChatOps-for-MIM-Teams.ps1
Last active Aug 27, 2019
ChatOps for Microsoft Identity Manager - Teams Configuration and Start Script. https://blog.darrenjrobinson.com/chatops-for-microsoft-identity-manager/
View ChatOps-for-MIM-Teams.ps1
# Install Poshbot PowerShell Module if it doesn't already exist
if (-not (Get-Module -Name "Poshbot")) {
install-module Poshbot
}
# Install LithnetRMA PowerShell Module if it doesn't already exist
if (-not (Get-Module -Name "LithnetRMA")) {
install-module LithnetRMA
}
@darrenjrobinson
darrenjrobinson / ChatOps-for-MIM-Slack.ps1
Last active Aug 27, 2019
ChatOps for Microsoft Identity Manager - Slack Configuration and Start Script. Associate blogpost https://blog.darrenjrobinson.com/chatops-for-microsoft-identity-manager/
View ChatOps-for-MIM-Slack.ps1
# Install Poshbot PowerShell Module if it doesn't already exist
if (-not (Get-Module -Name "Poshbot")) {
install-module Poshbot
}
# Install LithnetRMA PowerShell Module if it doesn't already exist
if (-not (Get-Module -Name "LithnetRMA")) {
install-module LithnetRMA
}
View schema.ps1
# Azure MFA API Schema
$obj = New-Object -Type PSCustomObject
$obj | Add-Member -Type NoteProperty -Name "Anchor-ID|String" -Value "f2ceedf9-888f-4313-bf97-2326f066abc3"
$obj | Add-Member -Type NoteProperty -Name "objectClass|String" -Value "mfaUser"
$obj | Add-Member -Type NoteProperty -Name "userPrincipalName|string" -Value "string"
$obj | Add-Member -Type NoteProperty -Name "isMfaRegistered|boolean" -Value $true
$obj | Add-Member -Type NoteProperty -Name "isRegistered|boolean" -Value $true
$obj | Add-Member -Type NoteProperty -Name "authMethods|string[]" -Value ("string","string")
$obj | Add-Member -Type NoteProperty -Name "isEnabled|boolean" -Value $true
$obj | Add-Member -Type NoteProperty -Name "isCapable|boolean" -Value $true
View import.ps1
param (
$Username,
$Password,
$OperationType,
[bool] $usepagedimport,
$pagesize,
$Credentials
)
$DebugFilePath = "C:\Program Files\Microsoft Forefront Identity Manager\2010\Synchronization Service\Extensions\AzureMFA\Debug\mfaUsersImport.txt"
@darrenjrobinson
darrenjrobinson / Decode Azure JWT Token.ps1
Created Jul 18, 2019
Decode an Azure JWT Token and find expiry time in local timezone
View Decode Azure JWT Token.ps1
function Parse-JWTtoken {
[cmdletbinding()]
param([Parameter(Mandatory = $true)][string]$token)
#Validate as per https://tools.ietf.org/html/rfc7519
#Access and ID tokens are fine, Refresh tokens will not work
if (!$token.Contains(".") -or !$token.StartsWith("eyJ")) { Write-Error "Invalid token" -ErrorAction Stop }
#Header
$tokenheader = $token.Split(".")[0].Replace('-', '+').Replace('_', '/')
@darrenjrobinson
darrenjrobinson / MIMBackup.ps1
Last active Aug 13, 2019
Export and document MIM Configuration, generate Static WebPage with MIM Export and Config. Associated blogpost https://blog.darrenjrobinson.com/automated-microsoft-identity-manager-configuration-backups-documentation-to-azure/
View MIMBackup.ps1
# Import LithnetMIISAutomation for MIM Sync Server Config Exports
Import-Module lithnetmiisautomation
# Find the MA's
$managementagents = Get-ManagementAgent
write-host -ForegroundColor green "$($managementagents.Count) management agents found"
# Local Backup Path
$BackupPath = "G:\Backup"
$foldername = Get-Date -format dd-MM-yyyy-hh-mm
$outputfilepath = "$BackupPath\$foldername"
View Send-PushNotification.ps1
# My Push Bullet Access Token
# Created via Profile Page https://www.pushbullet.com/#settings/account
$pbAccessToken = 'yourPushBulletAccessToken'
# Push Bullet API URI
$pbApiURI = "https://api.pushbullet.com/"
# Web Request Header
$pbHeader = @{"Access-Token" = $pbAccessToken
'Content-Type' = "application/json"
}
View who is home and away.ps1
# Clients to Monitor
$uInterestingClients = @()
$uInterestingClients += "myPhone"
$uInterestingClients += "otherPhone"
$uInterestingClients += "anotherPhone"
# Unifi Controller Login Base URI
$uController = 'yourControllerIP' # e.g 'https://192.168.1.2:8443'
# Identifier of the site in UniFi. Set to Default to use the default site
$uSiteID = "default"
You can’t perform that action at this time.