Skip to content

Instantly share code, notes, and snippets.

View iamacarpet's full-sized avatar

Samuel iamacarpet

View GitHub Profile
@iamacarpet
iamacarpet / teamsupdate.ps1
Created September 23, 2021 11:05
Force a Microsoft Teams update
$ProgressPreference = 'SilentlyContinue'
$TeamsSettings = $HOME + "\AppData\Roaming\Microsoft\Teams\settings.json"
$Setting = Get-Content $TeamsSettings -ErrorAction Continue | ConvertFrom-Json | Select Version
$Version = $Setting.Version
echo "Checking for updates..."
$UpdateInfo = curl "https://teams.microsoft.com/desktopclient/update/$Version/windows/x64?ring=general"
$UpdateData = $UpdateInfo | ConvertFrom-json
@iamacarpet
iamacarpet / composer.json
Last active October 19, 2021 14:11
Simplistic GCP Secret Manager usage from PHP
{
"require": {
"google/cloud": "^0.171.0"
}
}
@iamacarpet
iamacarpet / 4.41.16.txt
Created November 26, 2021 21:43
Ubiquiti G3 Bullet / G3 Flex firmware for standalone mode
https://fw-download.ubnt.com/data/uvc/c50c-s2l-4.41.16-bcf8b0e1872741b780e45c3d4114f711.bin
@iamacarpet
iamacarpet / Check-Dbx.ps1
Last active May 9, 2022 10:45 — forked from out0xb2/Check-Dbx.ps1
Parses signature data from the pk, kek, db, and dbx UEFI variables.
Write-Host "Checking for Administrator permission..."
if (-NOT ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")) {
Write-Warning "Insufficient permissions to run this script. Open the PowerShell console as administrator and run this script again."
Break
} else {
Write-Host "Running as administrator: continuing execution..." -ForegroundColor Green
}
$patchfile = $args[0]
@iamacarpet
iamacarpet / config.yaml
Created January 31, 2023 15:23
Google Cloud Ops Agent: Windows Server DHCP Audit Log Parser
logging:
receivers:
dhcp_audit:
type: files
include_paths:
- C:\Windows\System32\dhcp\DhcpSrvLog-*.log
record_log_file_path: true
processors:
exclude_dhcp_guff:
type: exclude_logs
@iamacarpet
iamacarpet / Boot-Glazier.ps1
Last active March 22, 2025 10:27
Glazier WinPE boot from existing Windows install
cd C:\Windows\Temp
& curl.exe --output glazier.iso https://storage.googleapis.com/example-glazier-files/OSDCloud-WinPE-Glazier.iso
Mount-DiskImage C:\Windows\Temp\glazier.iso -PassThru
$driveLetter = ($mountResult | Get-Volume).DriveLetter
Copy-Item -Path $( -join($driveLetter, ":\sources\") ) -Destination C:\sources -Recurse
mkdir C:\boot
Copy-Item -Path $( -join($driveLetter, ":\boot\boot.sdi" ) ) -Destination C:\boot\boot.sdi
Dismount-DiskImage C:\Windows\Temp\glazier.iso
@iamacarpet
iamacarpet / Boot
Last active March 22, 2025 10:26
Glazier UEFI network boot (Secure Boot enabled)
#!ipxe
# Some menu defaults
set menu-timeout 60000
set submenu-timeout ${menu-timeout}
isset ${menu-default} || set menu-default exit
###################### MAIN MENU ####################################