Skip to content

Instantly share code, notes, and snippets.

View derekxmartin's full-sized avatar

Derek Martin derekxmartin

View GitHub Profile
https://learn.microsoft.com/en-us/services-hub/microsoft-engage-center/health/remediation-steps-ad/set-the-account-lockout-threshold-to-the-recommended-value
# Use the part of your ticket URL before /browse/, including /jira if present.
JIRA_BASE_URL='https://jira.example.com'
ISSUE_KEY='OPS-123'
# Paste your Jira Server personal access token at the prompt.
read -rsp 'Jira personal access token: ' JIRA_PAT
echo
# Replace the URL and title below with the web link you want on the ticket.
curl --request POST \
https://claude.ai/artifact/Cy2d8Vn63CnzCtonA1LSah
$uri = 'https://YOUR-VECTR-HOST/sra-purpletools-rest/graphql'
$headers = @{
Authorization = 'VEC1 YOUR_API_KEY_ID:YOUR_API_KEY_SECRET'
}
$query = @'
query ListOutcomes {
outcomes {
id
e7cd9332bebe1d9f7a142a25a68d0e22
#requires -Version 5.1
Set-StrictMode -Version 2.0
$ErrorActionPreference = 'Stop'
function Get-Value {
param($Object, [string] $Name, $Default = $null)
if ($null -eq $Object) { return $Default }
if ($Object -is [Collections.IDictionary]) {
if ($Object.Contains($Name) -and $null -ne $Object[$Name]) { return $Object[$Name] }
return $Default
#requires -Version 5.1
Set-StrictMode -Version 2.0
$ErrorActionPreference = 'Stop'
function Get-Value {
param($Object, [string] $Name, $Default = $null)
if ($null -eq $Object) { return $Default }
if ($Object -is [Collections.IDictionary]) {
if ($Object.Contains($Name) -and $null -ne $Object[$Name]) { return $Object[$Name] }
return $Default
#requires -Version 5.1
Set-StrictMode -Version 2.0
$ErrorActionPreference = 'Stop'
function Get-Value {
param($Object, [string] $Name, $Default = $null)
if ($null -eq $Object) { return $Default }
if ($Object -is [Collections.IDictionary]) {
if ($Object.Contains($Name) -and $null -ne $Object[$Name]) { return $Object[$Name] }
return $Default
#requires -Version 5.1
<#
.SYNOPSIS
Creates Jira Data Center issues for scenarios in completed Cymulate assessments, then applies configured enrichment.
.EXAMPLE
.\Sync-CymulateToJira.ps1 -ConfigPath .\config.jira.json -RunDate '2026-09-17' -DryRun -Verbose
.EXAMPLE
.\Sync-CymulateToJira.ps1 -StartDate '2026-09-01' -EndDate '2026-09-17' -WhatIf
.EXAMPLE
.\Sync-CymulateToJira.ps1 -StartDate '2026-09-20' -EndDate '2026-09-27' -DryRun -DiagnosticLogPath .\jira-diagnostic.log -Verbose
#requires -Version 5.1
Set-StrictMode -Version 2.0
$ErrorActionPreference = 'Stop'
function Get-Value {
param($Object, [string] $Name, $Default = $null)
if ($null -eq $Object) { return $Default }
if ($Object -is [Collections.IDictionary]) {
if ($Object.Contains($Name) -and $null -ne $Object[$Name]) { return $Object[$Name] }
return $Default