Skip to content

Instantly share code, notes, and snippets.

@brimur
brimur / MsSkuToFriendlyName.ps1
Last active August 24, 2022 20:14
Dynamic map of Microsoft SKU to friendly name
##################################################################
#
# Requires Windows PowerShell v2 - v5
# Will not work in PS 7+ due to lack of ParsedHtml functionality
#
##################################################################
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
$skuPage = Invoke-WebRequest "https://docs.microsoft.com/en-us/azure/active-directory/enterprise-users/licensing-service-plan-reference"
# https://www.theregister.com/2020/12/07/microsoft_teams_rce_flaw/
# https://github.com/oskarsve/ms-teams-rce
# Taking the vulnerable version from the above repo. I'm hoping that's the latest version this flaw exists on
# Output format is for limitations in our MSP software
# username:version (shows what version user is running, for every user running Teams at time of scan)
# RunMin = Lowest version found running
# RunMax = Highest version found running
# InstalledVersions = What versions are registered in add/remove programs
# and if the installed version is vulnerable, but user versions have updated, let us know situation is actually OK
# updated to version 30290 instead of 21759 as author found that some of the vulns had been updated late October apparently
@davefunkel
davefunkel / Script-Template-WithCreds.ps1
Last active March 11, 2024 08:49
PowerShell Script Template with Saved Creds
<#
.SYNOPSIS
The synopsis goes here. This can be one line, or many.
This version of the template has inbuilt functions to capture credentials and store it securely for reuse
Avoids the need to have plaintext passwords in the script
.DESCRIPTION
The description is usually a longer, more detailed explanation of what the script or function does.
Take as many lines as you need.