Assumptions: Conditional Access Policies (CA) do not have sessions properties listed below enabled: Since we do not to use CA to manage sign-in frequency, refresh and session tokens will be set to the default configuration with no option to change their lifetimes. Property Policy property string Affects Default Refresh Token Max Inactive Time MaxInactiveTime Refresh tokens 90 →
[EXO][PS] Audit Log Search for Sign Mailbox
Audit Log Search
[EXO][PS] Identify if user is part of a big AD Group
Quickly check if a user or subset of users are part of a ad group that has more than 5000 members.
1 2 3 4 5 |
$adgroup = “[group]” $groupdn = (get-adgroup $adgroup).distinguishedname $members = dsget group $grouppn -members $total = foreach ($i in $members){$u = $i.trim('"'); get-aduser $u | select userprincipalname} $total -like "*[unique string]*" |
[EXO][PS] Find all the Distribution Groups a user is a member of.
Quickly find out all the Distribution Groups a user is a member of with a few lines of simple PS code.
1 2 3 |
$Username = "johnsmith@hiepic.com" $DistributionGroups = Get-DistributionGroup -ResultSize unlimited | where { (Get-DistributionGroupMember -ResultSize unlimited $_.Name | foreach {$_.PrimarySmtpAddress}) -contains "$Username"} $DistributionGroups |
[EXO] Setting up Room Finder in a Hybrid Environment
Summary: This article documents the what’s, why’s and the how’s of setting up Room Finder and Workspaces in a hybrid Office 365 Exchange Environment. The on-premise environment uses ADC with no write-back enabled. Buildings, Cities, Types, and Filters (Capacity, Floors, Features) A room list is a distribution group. A room list is a collection of room mailboxes. →
[LINUX] Sending email with CURL
Check if port (25 is used for example) is opened.
1 |
curl -vv telnet://DestinationServerName:25 |
Example of command to send e-mail using curl. More parameters and information can be found here: https://everything.curl.dev/usingcurl/smtp
1 |
curl smtp://mail.example.com --mail-from myself@example.com --mail-rcpt receiver@example.com --upload-file email.txt |
Creating Example.txt (using vi editor).
1 2 3 4 5 6 |
$ vi filename.txt # vi (vee eye) editor opens in "command mode" # type i to go into "insert mode", to edit the file. # type esc once done with editing to exit "insert mode" and back into "command mode" # to save, type wq in "command mode" to write and quit. |
An example of (Example.txt)
1 2 3 4 5 |
From: John Smith <john@domain.com> To: Joe Smith <smith@domain.com> Subject: test example email Date: Wed, 12 Dec 2021 12:35:34 test email |
[EXO] Exchange Online is depreciating Basic Authentication
If you havent heard already, Microsoft is taking huge steps to improve the overall security in Exchange Online and Office 365 by disabling basic authentication for legacy authentication protocols therein lies the question of “how” to prepare and shift your organization to adopting modern authentication protocols. In the second half of 2021, Microsoft had planned →
Dictate in Outlook and Office 365*
Try saying “new line”, “new paragraph,” “delete”, “bold that”, and “start list”. Other supported punctuation, commands, and symbols are below. Requirements – microphone access and reliable internet connection – Windwos 10+ – Office 2016+ with Office 365 subscription Supported: Word for Microsoft 365 Outlook for Microsoft 365 PowerPoint for Microsoft 365 Word for Microsoft 365 for Mac PowerPoint for →
[EXO] Various ways to grab all SMTP address from mailbox
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
$Mailbox = @{ ResultSize = “Unlimited” } $Filter = @{ FilterScript = {$_.PrefixString -ceq “smtp”} } $Select = @{ Property = @{Name=”First Name”;Expression={$_.DisplayName.Split(“,”)[1].Trim()}}, @{Name=”Last Name”;Expression={$_.DisplayName.Split(“,”)[0].Trim()}}, “DisplayName”, “ServerName”, “PrimarySmtpAddress”, @{Name=”EmailAddresses”;Expression={$_.EmailAddresses | Where-Object @Filter}} } Get-Mailbox @Mailbox | Select-Object @Select #Split all SMTP using comma (Get-Mailbox -ResultSize Unlimited |Select-Object DisplayName,ServerName,PrimarySmtpAddress, @{Name=“EmailAddresses”;Expression={$_.EmailAddresses |Where-Object {$_.PrefixString -ceq “smtp”} | ForEach-Object {$_.SmtpAddress}}}) |Select-Object DisplayName,ServerName,PrimarySmtpAddress, @{Name=“EmailAddresses”;Expression={$_.EmailAddresses.Split() -join(“,”)}} |Export-Csv C:\scripts\temp\addresses2.csv -NoTypeInformation Get-Mailbox -ResultSize Unlimited |Select Name, PrimarySMTPAddress, @{Name=’EmailAddresses’;Expression={[string]::join(“;”, ($_.EmailAddresses -cmatch ‘smtp’))}} Get-Mailbox -ResultSize Unlimited | Select-Object DisplayName,PrimarySmtpAddress, @{Name="EmailAddresses";Expression={$_.EmailAddresses | Where-Object {$_.PrefixString -ceq "smtp"} | ForEach-Object {$_.SmtpAddress}}} | Sort-Object DisplayName | Export-CSV "\\sf3\user1\shared\share\e\all_SMTP_Addresses.csv" -NoTypeInformation |
[EXO] Concert IMCEAEX string to X500
Simple script to convert IMCEAEX to X500 Address.
1 2 3 4 5 6 7 8 9 10 11 |
$IMCEAEX = Read-Host -Prompt "Enter IMCEAEX string to convert to X500" $IMCEAEX = $IMCEAEX -replace '_', '/' $IMCEAEX = $IMCEAEX -replace '\+20', ' ' $IMCEAEX = $IMCEAEX -replace '\+28', '(' $IMCEAEX = $IMCEAEX -replace '\+29', ')' $IMCEAEX = $IMCEAEX -replace '\+2E', '.' $IMCEAEX = $IMCEAEX -replace 'IMCEAEX-', '' $IMCEAEXNew = $IMCEAEX -split ('@') $IMCEAEX = $IMCEAEXNew[0] $IMCEAEX = 'X500:' + $IMCEAEX write-host $IMCEAEX |