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 / 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
View Azure LogAnalytics Report to CSV.ps1
#The resource URI
$resource = ""
#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 = "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%",
View Export.ps1
param (
$DebugFilePath = "C:\PROGRA~1\MICROS~4\2010\SYNCHR~1\EXTENS~2\HomeDir\homefolder\DebugHomeFolderMA.txt"
if(!(Test-Path $DebugFilePath))
{$DebugFile = New-Item -Path $DebugFilePath -ItemType File}
View Import.ps1
param (
[bool] $usepagedimport,
#Needs reference to .NET assembly used in the script.
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
View Get-SailPoint-IdentityNow-PrivateAPI-ProfileList.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]"AdminUser1".ToLower()
View Search Lithnet MIM Rest API.ps1
# Creds
$Username = "domain\user"
$Password = 'P@$$w0rd123'
$site_auth = "$($Username):$($Password)"
# Encode for Basic Authorization
$site_Bytes = [System.Text.Encoding]::utf8.GetBytes($site_auth)
# Server URI
View PS2GraphAPI.ps1
# The resource URI
$resource = ""
# Your Client ID and Client Secret obainted when registering your WebApp
$clientid = "726ec7c7-ff9e-4c28-b864-************"
$clientSecret = "KjYwt9tIf13kdBub7vaBJv4********************="
$redirectUri = "https://localhost:8001"
# UrlEncode the ClientID and ClientSecret and URL's for special characters
$clientIDEncoded = [System.Web.HttpUtility]::UrlEncode($clientid)
View Azure Function Table Service Output Binding.ps1
$breweryDBURI = ''
$key = 'myAPIKey'
$stylesURI = "$($breweryDBURI)styles?key=$($key)"
$beerStyles = Invoke-RestMethod -Uri $stylesURI -Method Get
[PSObject []] $outputArray = $null
foreach ($style in ${
$entity = [PSObject]@{
You can’t perform that action at this time.