Skip to content

Instantly share code, notes, and snippets.

View jwarwick-bry's full-sized avatar

Justin Warwick jwarwick-bry

View GitHub Profile
@jwarwick-bry
jwarwick-bry / fix_repeated_filename_extensions.ps1
Created August 13, 2025 21:24
Fix accidentally repeated filename extensions in Windows. For instance, if your Windows Explorer had the hide filename extensions option turned on, so you added filename extensions which then were actually extraneous.
get-ChildItem -recurse |?{ $_.name -match "(\.[A-Z]{1,5}){2,}" } |%{ $FIXED = $_ -replace "(\.[A-Z]{1,5}){2,}",'$1' ; move-Item -verbose "$_" "${FIXED}" }
@jwarwick-bry
jwarwick-bry / s_client.ps1
Last active June 14, 2024 20:33 — forked from IISResetMe/s_client.ps1
PowerShell semi-clone of openssl s_client tool
using namespace System.Net.Sockets
using namespace System.Net.Security
using namespace System.Security.Cryptography.X509Certificates
#based on https://blog.iisreset.me/openssl-s_client-but-in-powershell/
function ConvertFrom-X509Certificate {
param(
[Parameter(ValueFromPipeline)]
[X509Certificate2]$Certificate