Skip to content

Instantly share code, notes, and snippets.

@JeremyTBradshaw
JeremyTBradshaw / Distribute-Guids.ps1
Last active December 19, 2024 11:50
The Power of the Guid for Even Distribution of Large Sets
# Tackle large sets of objects with a Guid property which can be filtered as a string (e.g., ExternalDirectoryObjectId in Exchange Online).
<#
Guids are typically (near)PERFECTLY distributed alphabetically, working from the leftmost character to the rightmost character.
This means that if you have a large set of objects with a Guid property, you can filter them by the first character(s) of the Guid
to get perfectly distributed groups of the entire set of objects.
**NOTE: This is assuming all Guids in the set are generated from a common source (e.g., Active Directory/Entra ID, Exchange/EXO, etc.).
For example, if we just pick only the 1st character of the Guid, we can get 16 groups (0-9, A-F) of objects. Each of the 16 groups
@Tiberriver256
Tiberriver256 / LicenseSKUToNameMappingHash.ps1
Last active May 10, 2023 22:04
LicenseSKUToNameMapping HashTable
$LicenseSKUToNameMapping = @{
'SHAREPOINTENTERPRISE_MIDMARKET' = 'SharePoint Online (Plan 1)'
'ESKLESSWOFFPACK_GOV' = 'Microsoft Office 365 (Plan K2) for Government'
'AAD_BASIC' = 'Azure Active Directory Basic'
'AAD_BASIC_AAD_BASIC' = 'Azure AD Basic - Azure Active Directory Basic'
'AAD_BASIC_EDU' = 'Azure Active Directory Basic for EDU'
'AAD_EDU' = 'Azure Active Directory for Education'
'AAD_PREMIUM' = 'Azure Active Directory Premium P1'
'AAD_PREMIUM_AAD_PREMIUM' = 'Azure AD Premium P1 - Azure AD Premium P1'
'AAD_PREMIUM