Skip to content

Instantly share code, notes, and snippets.

@lucashalbert
lucashalbert / Uninstall-SEP.ps1
Created January 6, 2021 15:23
Script is designed to test if Sophos Endoint Protection is installed and proceed with uninstall.
<#
.SYNOPSIS
Script is designed to test if Sophos Endoint Protection is installed and proceed with uninstall.
.DESCRIPTION
Uninstall Sophos Endpoint Protection.
.INPUTS
none
@bmorrisondev
bmorrisondev / Set-NamecheapDdnsRecord.ps1
Last active June 25, 2025 16:40
Update a Dynamic DNS Record in Namecheap using PowerShell
function Set-NamecheapDdnsRecord {
<#
.SYNOPSIS
Update the IP address of a Dynamic DNS record in Namecheap.
.EXAMPLE
PS C:\> Set-NamecheapDdnsRecord -HostRecord www -Domain brianmorrison.me -ApiKey 12345678abcd -Ip 123.234.123.234
Updates the record for www.brianmorrison.me to 123.234.123.234
.NOTES
Author: Brian Morrison II
Date: 4/10/2019
@maxandersen
maxandersen / trigger-list.org
Last active December 3, 2024 17:17
I like the idea of trigger list to empty my head for TODO's so I went and created a .org version of David Allens GTD trigger list. Note: it looks much better when used from within .org mode.
@9to5IT
9to5IT / Manage-ADGroups.ps1
Created July 4, 2016 12:08
PowerShell: Cleanup empty AD Groups
Import-Module ActiveDirectory
#-------------------------------
# FIND EMPTY GROUPS
#-------------------------------
# Get empty AD Groups within a specific OU
$Groups = Get-ADGroup -Filter { Members -notlike "*" } -SearchBase "OU=GROUPS,DC=testlab,DC=com" | Select-Object Name, GroupCategory, DistinguishedName
#-------------------------------
@9to5IT
9to5IT / Manage-ADComputers.ps1
Created July 4, 2016 12:06
PowerShell: Cleanup inactive AD computer objects
Import-Module ActiveDirectory
# Set the number of days since last logon
$DaysInactive = 90
$InactiveDate = (Get-Date).Adddays(-($DaysInactive))
#-------------------------------
# FIND INACTIVE COMPUTERS
#-------------------------------
# Below are three options to find inactive computers. Select the one that is most appropriate for your requirements:
@9to5IT
9to5IT / Manage-ADUsers.ps1
Created July 4, 2016 12:04
PowerShell: Cleanup Inactive AD User Accounts
Import-Module ActiveDirectory
# Set the number of days since last logon
$DaysInactive = 90
$InactiveDate = (Get-Date).Adddays(-($DaysInactive))
#-------------------------------
# FIND INACTIVE USERS
#-------------------------------
# Below are four options to find inactive users. Select the one that is most appropriate for your requirements:
@kamilion
kamilion / smarttools.py
Created November 23, 2015 03:49
Some code I wrote to parse smartctl --xall output.
#!/usr/bin/env python2.7
from __future__ import print_function
from __future__ import unicode_literals
# System imports
import string
import sh
import re
import sys