flowchart TD
EStart([Message arrives at queue]) --> A1TrySend[Exchange tries to deliver message]
A1TrySend -->D1{Message can be sent?}
D1 -->|Yes| EvtDelivered([Message Delivered Externally])
D1 -->|No| D1A500{Error -class returned?}
D1A500 -->|500 Perm Fail| EvtNDR([Send Sender NDR Failure])
D1A500 -->|400 Retryable| D1BExpired{"MessageExpirationTimeout expired? <br/>(2d)"}
D1BExpired -->|Yes| EvtNDR
D1BExpired -->|No| D1CDsn{"DelayNotificationTimeOut expired?<br/>(4h)"}
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 convert-HelpToMarkdown { | |
<# | |
.SYNOPSIS | |
convert-HelpToMarkdown.ps1 - Gets the comment-based help and converts to GitHub Flavored Markdown text (for separate output to .md file). | |
.NOTES | |
Version : 1.0.0 | |
Author : Todd Kadrie | |
Website : http://www.toddomation.com | |
Twitter : @tostka / http://twitter.com/tostka | |
CreatedDate : 2021-09-14 |
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
get-exomailbox $tAddress ; get-recipient $tAddress | ft -a Name, RecipientT* ; |
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
$whatif=$true ;$exombx=get-exomailbox $tAddress ;$RemoteRoutingAddress=($exombx.emailaddresses |?{$_ -match '.*.mail\.onmicrosoft\.com'}).replace("smtp:","");$pltEnable=[ordered]@{ Identity=$exombx.alias ; RemoteRoutingAddress=$RemoteRoutingAddress ; whatif=$($whatif) ;} ;write-host -foregroundcolor green "$((get-date).ToString('HH:mm:ss')):Enable-RemoteMailbox w`n$(($pltEnable|out-string).trim())" ;Enable-RemoteMailbox @pltEnable;if(!$whatif){ $pltSet=[ordered]@{ Identity=$exombx.alias ; ExchangeGuid=$exombx.ExchangeGuid ; whatif=$($whatif) ; } ; write-host -foregroundcolor green "$((get-date).ToString('HH:mm:ss')):Set-RemoteMailbox w `n$(($pltSet|out-string).trim())" ; Set-RemoteMailbox @pltSet ; get-remotemailbox -id $exombx.alias | select userprin*,samac*,recipientt* ;} ; |
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
$whatif = $true ; | |
$exombx = get-exomailbox $tAddress ; | |
$RemoteRoutingAddress = ($exombx.emailaddresses | ? { $_ -match '.*.mail\.onmicrosoft\.com' }).replace("smtp:", ""); | |
$pltEnable = [ordered]@{ | |
Identity = $exombx.alias ; | |
RemoteRoutingAddress = $RemoteRoutingAddress ; | |
whatif = $($whatif) ; | |
} ; | |
write-host -foregroundcolor green "$((get-date).ToString('HH:mm:ss')):Enable-RemoteMailbox w`n$(($pltEnable|out-string).trim())" ; | |
Enable-RemoteMailbox @pltEnable; |
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
rxo ; get-exomailbox $tAddress ; rx10 ; get-recipient $tAddress | ft -a Name, RecipientT* ; |
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
$msolu = get-MsolUser -UserPrincipalName $adu.userprincipalname ; $msolu | format-list userprin*, *Error*, *status*, softdel*, lic*, islic* |
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
# AAD replication dawdle loop: | |
# 1-line, note, the get-msoluser cmdlet lacks an erroraction param, which causes it to error every pass. But the code plows on until object is returned replicated | |
Do { write-host "." -NoNewLine; $msolu = get-MsolUser -UserPrincipalName $adu.userprincipalname ; start-sleep -s 30 ; } Until($msolu) ; write-host "`a" ; write-host "`a" ; write-host "`a" ; $msolu | format-list userprin*, *Error*, *status*, softdel*, lic*, islic* ; |
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
# confirm $origOU was properly configured up in step 1. | |
$origOU ; | |
# move the ADUser object to the $origOU, note -whatif needs to be removed to execute | |
Move-ADObject -Identity $adu.ObjectGUID.guid -TargetPath $origOU -whatif ; | |
# confirm current location | |
get-aduser $adu.samaccountname | format-list dist* ; |
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
# note -whatif needs to be removed to execute | |
set-aduser -Identity $adu.samaccountname -clear msExchMailboxGuid, msexchrecipientdisplaytype, msexchrecipienttypedetails -whatif; | |
# confirm attributes cleared | |
get-aduser -Identity $adu.samaccountname -prop * | format-list msExchMailboxGuid, msexchrecipientdisplaytype, msexchrecipienttypedetails ; |
NewerOlder