Skip to content

Instantly share code, notes, and snippets.

View DamagedDingo's full-sized avatar

DamagedDingo

  • Sydney, Australia
View GitHub Profile
function Get-MsalTokenByCertificate {
[CmdletBinding()]
param(
[Parameter(Mandatory = $false)]
[switch]$ForceRefresh,
[Parameter(Mandatory = $false)]
[string]$tenantId,
[Parameter(Mandatory = $false)]
[string]$clientId,
[Parameter(Mandatory = $false)]
@DamagedDingo
DamagedDingo / configuration.nix
Created January 10, 2024 11:17
Dell XPS 15 9550 - Not currently working
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running ‘nixos-help’).
{ config, pkgs, ... }:
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
@DamagedDingo
DamagedDingo / detection.ps1
Created December 15, 2023 02:49
Intune Remediation Sample
if ( $(Get-ItemPropertyValue -Path "HKLM:\SOFTWARE\Policies\Google\Chrome\" -Name "BrowserSignin") -ne 2) ) {
# Not found, exit with 1 to trigger remidiation.
exit 1
}
else {
# Value found, exit 0
Write-Output "Some Output Must Be Written to STDOUT"
exit 0
}
@DamagedDingo
DamagedDingo / Defender_Test_Case.zsh
Created December 13, 2023 05:09
MacOS Defender Test Cases.
#!/bin/zsh
#https://learn.microsoft.com/en-us/microsoft-365/security/defender-endpoint/mac-install-manually?view=o365-worldwide
clear
# Check if real-time protection is enabled
if mdatp health --field real_time_protection_enabled > /dev/null; then
echo "Real-time protection is Enabled"
printf "Press Enter to continue..."
read -r