This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://support.microsoft.com/en-us/office/user-experience-changes-for-sharing-a-calendar-in-outlook-5978620a-fe6c-422a-93b2-8f80e488fdec | |
reg add HKCU\SOFTWARE\Microsoft\Office\16.0\Outlook\Options\Calendar /v ShowLegacySharingUX /t REG_DWORD /d 1 | |
# https://support.microsoft.com/en-us/office/how-to-revert-the-outlook-desktop-webview-based-room-finder-to-the-legacy-room-finder-e872b6f2-0d36-41ff-861d-adaab2da9c28?ui=en-US&rs=en-US&ad=US | |
reg add HKCU\SOFTWARE\Microsoft\Office\16.0\Outlook\Options\Calendar /v ShowLegacyRoomFinder /t REG_DWORD /d 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@" | |
HostControllerService | |
MSComplianceAudit | |
MSExchangeADTopology | |
MSExchangeAntispamUpdate | |
MSExchangeCompliance | |
MSExchangeDagMgmt | |
MSExchangeDelivery | |
MSExchangeDiagnostics | |
MSExchangeEdgeSync |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Longer version: https://github.com/JeremyTBradshaw/PowerShell/blob/main/Get-BackPressureStatus.ps1 | |
# Reference: https://learn.microsoft.com/en-us/exchange/mail-flow/back-pressure#view-back-pressure-resource-thresholds-and-utilization-levels | |
$TransportServers = Get-TransportService | |
$backPressureDiagInfo = foreach ($srv in $TransportServers) { | |
[xml]$perServerBPDiagInfo = Get-ExchangeDiagnosticInfo -Server $srv.Name -Process EdgeTransport -Component ResourceThrottling | |
foreach ($rsrc in $perServerBPDiagInfo.Diagnostics.Components.ResourceThrottling.ResourceTracker.ResourceMeter) { | |
$rsrc | Select-Object @{Name = 'Server'; Expression = { $srv.Name } }, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$IPRegex = @( | |
'^(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}', #<-: 0. to 255. (x3) | |
'([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])', #<---------: 0 to 255 | |
'($|/([8-9]|[1-2][0-9]|3[0-2]))$' #<-----------------------------: (optional) /8 to /32 | |
) -join '' | |
$Variations = @( | |
# Will match: | |
'0.0.0.0', | |
'10.0.0.0/8', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Windows Registry Editor Version 5.00 | |
;#======#---------------# | |
;#region# .NETFramework # | |
;#======#---------------# | |
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\v2.0.50727] | |
"SystemDefaultTlsVersions"=dword:00000001 | |
"SchUseStrongCrypto"=dword:00000001 | |
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\v4.0.30319] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function ConvertFrom-DistinguishedName ($DistinguishedName) { | |
$Domain = ($DistinguishedName -split ',DC=' | Where-Object { $_ -notmatch '^CN=' }) -join '.' | |
$CNPath = ($DistinguishedName -split ',DC=' | Where-Object { $_ -match '^CN=' }) -split ',\w\w=' | |
[array]::Reverse($CNPath) | |
($Domain + '/' + ($CNPath -join '/')) -replace 'CN=' -replace '\\' | |
} | |
ConvertFrom-DistinguishedName "CN=Bradshaw\, Jeremy,OU=PowerShell,DC=Sample,DC=code" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<# | |
.Synopsis | |
This is not intended to be an executable script. It's PS1 for now simply for syntax highlighting. | |
#> | |
#======#---------------------------# | |
#region# Backup LegacyExchangeDN's # | |
#======#---------------------------# | |
$LDNRecipients = @() | |
$Recipients = @() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using namespace System | |
using namespace System.Runtime.InteropServices | |
########-----------# | |
#region# Variables # | |
########-----------# | |
try { | |
$Cred1 = Import-Clixml "$($HOME)\Cred1.xml" -ErrorAction Stop | |
Write-Information -MessageData "`$Cred1: $($Cred1.UserName)" -InformationAction Continue |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Backup all *.config files. | |
# Backup all supported OWA customization files: | |
# https://docs.microsoft.com/en-us/Exchange/clients/outlook-on-the-web/customize-outlook-on-the-web?view=exchserver-2016 | |
# https://docs.microsoft.com/en-us/Exchange/clients/outlook-on-the-web/customize-outlook-on-the-web?view=exchserver-2019 | |
$BackupLocation = "$HOME\Desktop\Exchange_pre-CU_Backup\" | |
$ExInstallRoot = 'C:\Program Files\Microsoft\Exchange Server\v15\' | |
$OwaAuthDir = '\FrontEnd\HttpProxy\owa\auth\' | |
$OwaPremDir = '\ClientAccess\Owa\prem\' |
NewerOlder