Kill all active user sessions in any Azure AD/ Office 365 application

If you are are ever in a situation where you have to deal with a compromised O365 account or situation similar to mine where users were assigned Onedrive/SPO license and you want to revoke them and stop users from using them immediately, the below cmdlet is much helpful. If you are dealing with a large … Continue reading Kill all active user sessions in any Azure AD/ Office 365 application

Add Fullmailbox Permission in PowerShell using a CSV file

Create a CSV with following fields and save it in a temp folder UserMailbox and User copy the below and save as .ps1 file in the same temp folder e.g C:\temp $csv = Import-csv -path “C:\temp\fullaccess.csv” foreach($User in $csv) { Add-MailboxPermission -Identity $user.UserMailbox -User $user.User -AccessRights FullAccess -InheritanceType All }   Run the script to apply … Continue reading Add Fullmailbox Permission in PowerShell using a CSV file

Force a sync from Azure AD Connect to Office 365

AAD sync runs every 30 minutes, we are several situations where you cant wait 30 minutes for a change to sync across, you still want to force a sync. To do so, on the server which has AAD Connect installed and type the following to import the AAD Connect PowerShell module: Import-Module ADSync You check the … Continue reading Force a sync from Azure AD Connect to Office 365

Export Calendar permissions for specific OU

The below has been tested on exchange 2010 to export calendar permissions for mailboxes in a specific OU. # Get the mailboxes $Mailboxes = get-mailbox -OrganizationalUnit "OU=Users,DC=Contoso,DC=local" -Filter {RecipientTypeDetails -eq "usermailbox"} -ResultSize Unlimited # An array for the output $Output = @() # Loop through the mailboxes ForEach ($Mailbox in $Mailboxes) { # Get the … Continue reading Export Calendar permissions for specific OU

Get-MailboxStatistics to export Mailbox size in Exchange Powershell

Use the below to export mailbox statistics from exchange PowerShell. There are different commands which help you filter and manipulate the exported data. The exported information is always useful during Office 365 migration to assess mailbox sizes and item counts, last login time and required bandwidth. Export Mailbox size and statistics of all users get-mailbox  … Continue reading Get-MailboxStatistics to export Mailbox size in Exchange Powershell

How to Adjust the link expiration time in Office 365 Message Encryption for encypted emails

With the new Office 365 Message Encryption feature helps enable non-Office 365 recipients of protected emails to read and respond with ease, regardless of the device, app, service, or identity they use to receive their email. Yayy!! that is great no longer need to download software etc but now another challenge, when recipient see this message … Continue reading How to Adjust the link expiration time in Office 365 Message Encryption for encypted emails

Exchange 2013 Emails stuck in Drafts

No outgoing Emails in Exchange 2013 fresh install , sent emails get stuck in Drafts folder in OWA, Scenario: The problematic environment was a fresh install of exchange 2013, no migration and new mailboxes were created, but when emails were sent they got stuck in the drafts folder, OWA or outlook both failed sending emails. … Continue reading Exchange 2013 Emails stuck in Drafts