Skip to content

Instantly share code, notes, and snippets.

View jonathanbourke's full-sized avatar

Jonathan Bourke jonathanbourke

View GitHub Profile
@jonathanbourke
jonathanbourke / ubuntu-post-install.sh
Created September 30, 2025 11:20
A basic hardening script for Ubuntu Server 24.04 LTS.
#!/bin/bash
# Ubuntu 24.04 LTS Post-Installation Configuration Script
# This script configures additional security features and software
# for Ubuntu 24.04 LTS laptops using LUKS password-based encryption
# ANSI color codes for better readability
GREEN='\033[0;32m'
BLUE='\033[0;34m'
RED='\033[0;31m'
@jonathanbourke
jonathanbourke / set-macos-hostnames.sh
Created June 20, 2025 09:24
Intune script for MacOS to set device hostnames, comprehensively, to AA-<SERIAL> where AA = token for the client company.
#!/bin/bash
# ---------------------------------------------------------------------------
# Device Rename & Hostname Harmoniser for Microsoft Intune
#
# PURPOSE
# Generate a hostname <PREFIX>-<SERIAL> and write it to:
# ComputerName | LocalHostName | HostName | NetBIOSName
#
# SAFEGUARDS
# * Pure 7-bit ASCII; no back-slash line continuations.
@jonathanbourke
jonathanbourke / TT - MacOS - Custom - D - Change to English.json
Created June 13, 2025 08:16
MacOS Intune Policy to apply English, French, and German Language and Region settings; device context, ensure only one per device.
{
"@odata.context": "https://graph.microsoft.com/beta/$metadata#deviceManagement/deviceConfigurations(assignments())/$entity",
"@odata.type": "#microsoft.graph.macOSCustomConfiguration",
"@odata.id": "deviceManagement/deviceConfigurations(\u0027cebe527c-54b8-4ff9-be77-c733c0bb1a82\u0027)",
"@odata.editLink": "deviceManagement/deviceConfigurations(\u0027cebe527c-54b8-4ff9-be77-c733c0bb1a82\u0027)/microsoft.graph.macOSCustomConfiguration",
"id": "cebe527c-54b8-4ff9-be77-c733c0bb1a82",
"lastModifiedDateTime@odata.type": "#DateTimeOffset",
"lastModifiedDateTime": "2025-06-13T08:10:54.0221755Z",
"roleScopeTagIds@odata.type": "#Collection(String)",
"roleScopeTagIds": [
@jonathanbourke
jonathanbourke / Export-EntraMailboxesAndGroups.ps1
Created September 24, 2024 09:49
Generate a membership list for all M365 distribution lists, shared mailboxes, unified groups, and Microsoft Teams
# Script: Export-EntraMailboxesAndGroups.ps1
# Description: This script exports information about shared mailboxes, distribution lists,
# Microsoft 365 Groups, and Teams to a CSV file, with individual rows for each member.
# It includes handling for ambiguous group names and deduplicates M365 Groups and Teams.
# The intent is to process or analyse the resulting CSV in Excel using Pivot Tables.
# Author: Jonathan Bourke
# Date: 2024-09-24
# Version: 1.8
# Function to check if a module is installed and import it
@jonathanbourke
jonathanbourke / sentinel-sfdc-private-link.json
Created October 29, 2022 11:09
Azure ARM Template to deploy Sentinel Data Connector to Salesforce over private endpoints.