Skip to content

Instantly share code, notes, and snippets.

View joshooaj's full-sized avatar

Josh Hendricks joshooaj

View GitHub Profile
@joshooaj
joshooaj / Test-TlsConnection.ps1
Last active July 3, 2025 21:12
Tests a web URI for connectivity and certificate validation
function Test-TlsConnection {
<#
.SYNOPSIS
Tests a URI for connectivity, and checks whether the TLS certificate is valid.
.DESCRIPTION
This cmdlet tests a URI for connectivity, and checks whether the TLS
certificate is valid, expired, expiring soon, and returns information about
the certificate when used with InformationLevel 'Detailed'.
@joshooaj
joshooaj / New-VmsSelfSignedCertificate.ps1
Last active August 7, 2023 17:59
New-VmsSelfSignedCertificate
#Requires -RunAsAdministrator
#Requires -Modules pki
#Requires -Assembly System.Windows.Forms
<#
.SYNOPSIS
Creates a new web server certificate signed by a self-signed "root" signing certificate.
.DESCRIPTION
This script creates a new web server certificate and adds it to the
Cert:\LocalMachine\My certificate store, where it can be used by a Milestone
@potatoqualitee
potatoqualitee / sys-summit-demo.ps1
Last active December 16, 2025 11:18
dbatools for systems engineers and accidental dbas
break
<#
01. Find instances
02. Connect to instances
03. Check backups
04. Check disk space
05. Perform backups
06. Check for corruption
07. Install maintenance scripts
08. Export all settings for DR
@jborean93
jborean93 / Invoke-WithImpersonation.ps1
Last active January 20, 2025 01:30
Invoke a scriptblock in powershell with impersonation
# Copyright: (c) 2020, Jordan Borean (@jborean93) <jborean93@gmail.com>
# MIT License (see LICENSE or https://opensource.org/licenses/MIT)
Function Invoke-WithImpersonation {
<#
.SYNOPSIS
Invoke a scriptblock as another user.
.DESCRIPTION
Invoke a scriptblock and run it in the context of another user as supplied by -Credential.