Skip to content

Instantly share code, notes, and snippets.

View unclemusclez's full-sized avatar
🔫
Cooking

unclemusclez unclemusclez

🔫
Cooking
View GitHub Profile
@unclemusclez
unclemusclez / POWERSHELL-DOWNLOAD-SELF-SIGNED-SSL.md
Last active April 4, 2025 12:39
Download Self-Signed Certificates from Remote Server with PowerSell
# Function to download a self-signed certificate and save it as a PEM file
function Get-SelfSignedCertAsPem {
    param (
        [Parameter(Mandatory=$true)]
        [Uri]$Uri,                # The internal domain URL (e.g., https://internal.domain.com)
        [string]$OutputPath = "C:\Temp\certificate.pem"  # Where to save the PEM file
    )

    # Ensure the URI uses HTTPS