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
@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-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
}
@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
}
View connect to zOS.ps1
# wc3270 HTTPD Config from wc3270 Start Options e.g. wc3270 A:mainframe.customer.com.au -httpd 127.0.0.1:6001
$wc3270HTTPDHost = "127.0.0.1" # e.g FQDN of host running it, or localhost DNS Name or IP
$wc3270HTTPDPort = "6001" # HTTPD Port
$racfHost = "zoshost.customer.com.au" # z/OS Host
$racfUserID = "ADMINUserName" # RACF UserID
$racfUserPassword = "AdminPassword" # RACF Password
$tracelog = "c:\temp\zOStracelog.txt" # TraceLogPath
$wc3270Path = "C:\Program Files\wc3270" # wc3270 Install Path
$wc3270Args = "A:$($racfHost) -httpd $($wc3270HTTPDHost):$($wc3270HTTPDPort) -trace -tracefile `"$($tracelog)`" -utf8"
@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 AzureMFAInfoviaPowershell.ps1
# Username to connect to MFA Web Service SDK Server with
$UserName = "domain\user"
# Password for the account above
$Password = 'P@$$w0rd1!' | ConvertTo-SecureString -AsPlainText -Force
$Creds = New-Object System.Management.Automation.PSCredential -ArgumentList $UserName, $Password
# Create a WS Proxy to the SOAP Azure MFA WebService SDK Endpoint
$proxy = New-WebServiceProxy -Uri https://www.domain.com.au/MultiFactorAuthWebServiceSdk/PfWsSdk.asmx?WSDL -Credential $Creds
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('_', '/')
View TestMIMADMAPorts.ps1
# Insert Test-Port Function here from https://gallery.technet.microsoft.com/scriptcenter/97119ed6-6fb2-446d-98d8-32d823867131
# UDP Ports to probe
$udpports = @()
$udpports += "464" #Kerberos
$udpports += "3268" #GC
$udpports += "3269" #GC
# TCP Ports to probe
$ports = @()
You can’t perform that action at this time.