Skip to content

Instantly share code, notes, and snippets.

@Apoc70
Apoc70 / Set-TLS12.ps1
Last active May 17, 2024 16:15
PowerShell script to enable TLS 1.2 in preparation for Entra ID Connect, and to disable legacy TLS for Exchange Server 2019.
param (
[switch]$DisableLegacyTls
)
# Last updated: 2024-02-21
if($DisableLegacyTls) {
# Disable TLS 1.0 and 1.1
# Following https://learn.microsoft.com/exchange/plan-and-deploy/post-installation-tasks/security-best-practices/exchange-tls-configuration?view=exchserver-2019&WT.mc_id=M365-MVP-5003086
# Disable TLS 1.0
@jdhitsolutions
jdhitsolutions / Show-WeatherSummary.ps1
Created February 18, 2021 14:38
A PowerShell function that displays weather information using the wttr.in REST API.
#requires -version 5.1
<#
this must be run in a Windows Terminal or console session that supports the
emoji icons or use -Force if you know you are.
see https://github.com/chubin/wttr.in for API information
This command writes to the host not the PowerShell pipeline.
#>
@joegasper
joegasper / Get-PingSweep.ps1
Last active April 30, 2024 19:12
Get-PingSweep - super fast (~500ms) subnet ping sweep with option to resolve IP address
# Inspiration from https://twitter.com/mrhvid/status/929717169130176512 @mrhvid @Lee_Holmes
function ResolveIp($IpAddress) {
try {
(Resolve-DnsName $IpAddress -QuickTimeout -ErrorAction SilentlyContinue).NameHost
} catch {
$null
}
}
@keithga
keithga / Get-LatestUpdate.ps1
Last active February 23, 2024 13:17
script to get latest build.
<#
.SYNOPSIS
Get the latest Cumulative update for Windows
.DESCRIPTION
This script will return the list of Cumulative updates for Windows 10 and Windows Server 2016 from the Microsoft Update Catalog.
.NOTES
Copyright Keith Garner (KeithGa@DeploymentLive.com), All rights reserved.
@jdhitsolutions
jdhitsolutions / Test-IsPrime.ps1
Last active December 20, 2023 03:57
A PowerShell function to test if a number is prime.
Function Test-IsPrime {
<#
.Synopsis
Test if a number is prime
.Description
This command will test if a given number is prime based.
.Example