Skip to content

Instantly share code, notes, and snippets.

jborean93 /
Created Sep 15, 2020
ansible-galaxy collection update scenarios
#!/usr/bin/env bash
set -o pipefail -eu
function create_package {
if [ ! -z "${requirements}" ]; then
jborean93 / New-EXOPSSession.ps1
Last active Aug 21, 2020
Cross platform function that can connect to Exchange Online using modern auth
View New-EXOPSSession.ps1
# Copyright: (c) 2020, Jordan Borean (@jborean93) <>
# MIT License (see LICENSE or
#Requires -Module MSAL.PS
Function New-EXOPSSession {
Will open a PSSession to Exchange Online.
jborean93 / ConvertFrom-IndirectString.ps1
Created Aug 13, 2020
Converts an indirect string to the actual string value
View ConvertFrom-IndirectString.ps1
# Copyright: (c) 2020, Jordan Borean (@jborean93) <>
# MIT License (see LICENSE or
Function ConvertFrom-IndirectString {
Converts a indirect string identifier to the actual string value it represents.
.PARAMETER IndirectString
The indirect string that begins with '@' to convert to the proper string value.
jborean93 / Get-FtpFile.ps1
Created Aug 12, 2020
Gets a file from an FTP server
View Get-FtpFile.ps1
# Copyright: (c) 2020, Jordan Borean (@jborean93) <>
# MIT License (see LICENSE or
Function Get-FtpFile {
param (
jborean93 / Get-WindowsUpdate.ps1
Created Aug 4, 2020
Output a list of updates based on the criteria that you define
View Get-WindowsUpdate.ps1
# Copyright: (c) 2020, Jordan Borean (@jborean93) <>
# MIT License (see LICENSE or
Function Write-WUAError {
Convert raw HRESULT codes to a human readable error.
.PARAMETER Exception
The COMException that the error code is from.
jborean93 /
Last active Jul 29, 2020
Checks Ansible's ansible_builtin_runtime.yml for any missing or extra plugin entries
#!/usr/bin/env python3
import asyncio
import json
import os
import subprocess
import sys
import tempfile
import yaml
jborean93 /
Last active Jul 12, 2020
Documenting the behaviour of GSS_C_DELEG_POLICY_FLAG on both MIT and Heimdal


  • Kerberos authentication to a WinRM endpoint
  • 2 Windows endpoints, 1 is trusted for unconstrained delegation (Y), the other is not trusted for any delegation (N)
  • Trying to reconcile the behaviour of GSS_C_DELEG_POLICY_FLAG for both MIT and Heimdal
  • This does not take consider any krb5.conf values that could affect this behaviour
  • The docs behaviour is based on what is in this blog post
  • Tested on Centos 8 against a Microsoft KDC
  • MIT krb5 version 1.17
  • Heimdal krb5 version 7.7.0
jborean93 / Get-SMBIOSData.ps1
Last active Jun 25, 2020
Extract SMBIOS info with PowerShell
View Get-SMBIOSData.ps1
Add-Type -TypeDefinition @'
using Microsoft.Win32.SafeHandles;
using System;
using System.Collections.Generic;
using System.Runtime.ConstrainedExecution;
using System.Runtime.InteropServices;
namespace Ansible.Windows.Setup
public class NativeHelpers
jborean93 / example output.txt
Last active Jun 17, 2020
A script that can be used to decrypt WinRM exchanges using NTLM over http
View example output.txt
# Produced by './ winrm.pcapng --password VagrantPass1'
# The Wireshark exchange was just running the below in powershell.exe
# $cred = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList 'vagrant-domain@DOMAIN.LOCAL', (ConvertTo-SecureString -AsPlainText -Force -String 'VagrantPass1')
# Invoke-Command -ComputerName -ScriptBlock { hostname.exe } -Credential $cred -Authentication Negotiate
No: 433 | Time: 2020-06-17T09:55:58.987664 | Source: | Destination:
<?xml version="1.0" ?>
<s:Envelope xmlns:s="" xmlns:a="" xmlns:w="" xmlns:p="">
jborean93 /
Last active Jun 5, 2020
Info around macOS OMI building and GSSAPI issues

Requires the following pre-reqs

brew install pkg-config openssl

Build OMI

rm -rf output
./configure --enable-debug --prefix=/opt/omi-dev
You can’t perform that action at this time.