Skip to content

Instantly share code, notes, and snippets.

@meoso
meoso / Example.com-Password-Expiration-Notifications.ps1
Last active June 14, 2025 11:11
PowerShell Active Directory Password Expiration Email Notification
#################################################################################################################
#
# Password-Expiration-Notifications v20220823
# Highly Modified fork. https://gist.github.com/meoso/3488ef8e9c77d2beccfd921f991faa64
#
# Originally from v1.4 @ https://gallery.technet.microsoft.com/Password-Expiry-Email-177c3e27
# https://windowspoweressentials.com/2017/02/21/powershell-password-reminder-script-updated/
# https://github.com/titlerequired/public
# Robert Pearman (WSSMB MVP)
# TitleRequired.com
@meoso
meoso / v13-deprecations.ps1
Last active January 16, 2025 16:12
List some Veeam v13 deprecations
### List some Veeam v13 deprecations
clear;
Import-Module Veeam.Backup.PowerShell
Connect-VBRServer -Server localhost
# Get all Veeam jobs
$jobs = Get-VBRJob
Write-Host 'Jobs with retention type not set to "days":'
$jobsNotSetToDays = $jobs | Where-Object {
@meoso
meoso / 0_re-encode.scripts.md
Last active December 13, 2024 19:45
ffmpeg re-encoding scripts to reduce filesize and remain "visually" lossless

I've accumulated too many quadcopter (drone) footage files (.mp4, .MOV, etc).

I researched how to ffmpeg re-encode with "practical" losslessness (i.e. not lessless, but human eye acceptable).

These are my resultant scripts. The filenames say "reduce" but should actually be "re-encode".

In the case of GoPro, these scripts should retain the Gyro data.

I recommend footage filenames and folder-names to not include spaces. I rename all existing files in a folder with the command rename "s/[[:space:]]/_/g" * to make certain i have no spaces in filenames. You could rename all files in subfolders as well: e.g. find ~/SYNC/YT-Archive/ -type f -name "*[[:space:]]*" -exec rename "s/[[:space:]]/_/g" "{}" \;.

@meoso
meoso / gist:392ad3dd69859c0e3244464e08aaed51
Created October 16, 2024 20:33
Ghetto GPO Change-Audit Powershell Emailing script
#########################################################################
############ Ghetto GPO Change Audit ##############
############ DRAFT / WIP in-progress ##############
############ Lists/Emails modified GPO's only, not linking ##############
#########################################################################
############ script by NJD 2021-03-08, edited Oct 2024 ##############
#########################################################################
############# Programmatically set variables ################
$MyDomain = (Get-ADDomain).DNSRoot # AD Domain root in plain-text format
#################################################################################################################
#
# Version 1.4 February 2016
# Robert Pearman (WSSMB MVP)
# TitleRequired.com
# Script to Automated Email Reminders when Users Passwords due to Expire.
#
# Requires: Windows PowerShell Module for Active Directory
#
# For assistance and ideas, visit the TechNet Gallery Q&A Page. http://gallery.technet.microsoft.com/Password-Expiry-Email-177c3e27/view/Discussions#content
#! /bin/sh
case "$1" in
start)
if ( pidof zerotier-one )
then echo "ZeroTier-One is already running."
else
echo "Starting ZeroTier-One" ;
/opt/bin/zerotier-one -d ;
echo "$(date) Started ZeroTier-One" >> /opt/var/log/zerotier-one.log ;
@meoso
meoso / enable_CBT_on_VMs_where_CBT_notEnabled.ps1
Created January 29, 2020 14:18
PowerCLI enable CBT on VM's where CBT is disabled
$vcenter="vcenter.domain.tld"
Import-Module -Global VMware.VimAutomation.Core
Disconnect-VIServer * -Confirm:$false -Force | Out-Null #Disconnect all previously connected vcenter servers
# new spec
$vmConfigSpec = New-Object VMware.Vim.VirtualMachineConfigSpec
# enable ctk
$vmConfigSpec.changeTrackingEnabled = $true
@meoso
meoso / synology_zerotier.md
Created March 8, 2023 20:20 — forked from DraTeots/synology_zerotier.md
Sinology DS211j ZeroTier configuration
@meoso
meoso / gist:543b213468cacc64addeb4961249529f
Created December 5, 2022 17:45
freshly installed Ubuntu 22.04.1 apt sources.list
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://us.archive.ubuntu.com/ubuntu jammy main restricted
# deb-src http://us.archive.ubuntu.com/ubuntu jammy main restricted
## Major bug fix updates produced after the final release of the
## distribution.
deb http://us.archive.ubuntu.com/ubuntu jammy-updates main restricted
# deb-src http://us.archive.ubuntu.com/ubuntu jammy-updates main restricted
@meoso
meoso / example.com-account-password-activation-email.ps1
Created June 2, 2022 13:46
PowerShell account activation email script
#################################################################################################################
#
# Script for Account Activation Notifications (i.e. Password Must be Changed at next logon)
# v20180329
# Heavily gutted/modified from Password Expiry Email Notification Version 1.4 by Robert Pearman (WSSMB MVP) @ TitleRequired.com
# Originally downloaded from https://gallery.technet.microsoft.com/Password-Expiry-Email-177c3e27
# Requires: Windows PowerShell Module for Active Directory
#
##################################################################################################################
# Please Configure the following variables....