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 / Azure LogAnalytics Report to CSV.ps1
Last active May 21, 2019
Azure Log Analytics Report using KQL via REST API with PowerShell output to CSV. Associated blogpost https://blog.darrenjrobinson.com/?p=39731
View Azure LogAnalytics Report to CSV.ps1
#The resource URI
$resource = "https://westus2.api.loganalytics.io"
#Your Client ID and Client Secret obtained when registering your WebApp
$clientid = "yourAADAppClientID"
$clientSecret = "yourAADAppClientSecret"
#Your Reply URL configured when registering your WebApp
$redirectUri = "https://localhost"
#Scope
$scope = "Data.Read"
Add-Type -AssemblyName System.Web
View WindowsTerminal.json
{
"defaultProfile": "{5232b930-2f97-47b0-8042-75c9932cbc5e}",
"initialRows": 30,
"initialCols": 120,
"alwaysShowTabs": true,
"showTerminalTitleInTitlebar": false,
"experimental_showTabsInTitlebar": false,
"profiles": [
{
"startingDirectory": "%USERPROFILE%",
@darrenjrobinson
darrenjrobinson / BOFH - Run.ps1
Last active Apr 25, 2019
Bastard Operator From Hell - Azure PowerShell Function App Excuse Generator
View BOFH - Run.ps1
function BOFHExcuse {
# BOFH Excuse Generator
$first = @("Temporary","Intermittant","Partial","Redundant","Total","Multiplexed","Inherent","Duplicated","Dual-Homed","Synchronous","Bidirectional","Serial","Asynchronous","Multiple","Replicated","Non-Replicated","Unregistered","Non-Specific","Generic","Migrated","Localised","Resignalled","Dereferenced","Nullified","Aborted","Serious","Minor","Major","Extraneous","Illegal","Insufficient","Viral","Unsupported","Outmoded","Legacy","Permanent","Invalid","Deprecated","Virtual","Unreportable","Undetermined","Undiagnosable","Unfiltered","Static","Dynamic","Delayed","Immediate","Nonfatal","Fatal","Non-Valid","Unvalidated","Non-Static","Unreplicatable","Non-Serious")
$second = @("Array","Systems","Hardware","Software","Firmware","Backplane","Logic-Subsystem","Integrity","Subsystem","Memory","Comms","Integrity","Checksum","Protocol","Parity","Bus","Timing","Synchronisation","Topology","Transmission","Reception","Stack","Framing","Code","Programming","Periphe
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
View Azure Function Table Service Output Binding.ps1
$breweryDBURI = 'https://sandbox-api.brewerydb.com/v2/'
$key = 'myAPIKey'
$stylesURI = "$($breweryDBURI)styles?key=$($key)"
$beerStyles = Invoke-RestMethod -Uri $stylesURI -Method Get
[PSObject []] $outputArray = $null
foreach ($style in $beerStyles.data){
$entity = [PSObject]@{
View Make IdentityNow Identity Attribute Searchable.ps1
$orgName = "yourOrgname"
# Get Identity Attr
$getIdentityAttributesBaseURI = "https://$($orgName).api.identitynow.com/cc/api/identityAttribute/list"
# Get Attr Only
$getIdentityAttrBaseURI = "https://$($orgName).api.identitynow.com/cc/api/identityAttribute/get?name="
# Update URI
$attributeUpdateBaseURI = "https://$($orgName).api.identitynow.com/api/identityAttribute/update?"
$identityAttrs = Invoke-RestMethod -Method Get -Uri $getIdentityAttributesBaseURI -Headers @{Authorization = "$($v3Token.token_type) $($v3Token.access_token)"; "content-type" = "application/json"}
@darrenjrobinson
darrenjrobinson / SailPoint IdentityNow AzureAD Source Filter.ps1
Last active Mar 31, 2019
SailPoint IdentityNow AzureAD Source Filters - Cloud Only Accounts, Guest (B2B) Accounts, Hybrid (AD & AAD) Accounts. Associated post https://blog.darrenjrobinson.com/building-sailpoint-identitynow-azure-ad-source-filters/
View SailPoint IdentityNow AzureAD Source Filter.ps1
# IdentityNow Organisation Name
$orgName = "CompanyName"
# AAD GUESTS (B2B)
$AADSourceUserFilters = @{}
$AADSourceUserFilters.Add("connector_userFilters", "userType eq 'guest'")
$AADSourceUpdateURI = "https://$($orgName).api.identitynow.com/cc/api/source/update/SOURCENumber"
$updateSource = Invoke-RestMethod -Method Post -Uri $AADSourceUpdateURI -Headers @{Authorization = "$($v3Token.token_type) $($v3Token.access_token)"} -Body $AADSourceUserFilters
View Update IdentityNow Identity Profile Priority.ps1
# Your API Client ID
$clientID = 'yourClientID'
# Your API Client Secret
$clientSecret = 'yourClientSecret'
$Bytes = [System.Text.Encoding]::utf8.GetBytes("$($clientID):$($clientSecret)")
$encodedAuth = [Convert]::ToBase64String($Bytes)
# Your IdentityNow Tenant Name
$orgName = 'yourOrgName'
# IdentityNow Admin User and PWD to connect with
$adminUSR = [string]"yourAdminname".ToLower()
View Generate Identity Profiles Report.ps1
# Your API Client ID
$clientID = 'yourClientID'
# Your API Client Secret
$clientSecret = 'yourClientSecret'
$Bytes = [System.Text.Encoding]::utf8.GetBytes("$($clientID):$($clientSecret)")
$encodedAuth = [Convert]::ToBase64String($Bytes)
# Your IdentityNow Tenant Name
$orgName = 'yourOrgName'
# IdentityNow Admin User and PWD to connect with via oAuth
$adminUSR = [string]"yourAdminName".ToLower()
View Aggregate Source without Optimization.ps1
# Your API Client ID
$clientID = 'yourClientID'
# Your API Client Secret
$clientSecret = 'yourSecret'
$Bytes = [System.Text.Encoding]::utf8.GetBytes("$($clientID):$($clientSecret)")
$encodedAuth = [Convert]::ToBase64String($Bytes)
# Your IdentityNow Tenant Name
$orgName = 'yourOrg'
# IdentityNow Admin User and PWD to connect with via oAuth
$adminUSR = [string]"yourAdminAccount".ToLower()
You can’t perform that action at this time.