Script to list The Members of Nested Distribution Groups

Connect to Exchange Online PowerShell $UserCredential = Get-Credential$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirectionImport-PSSession $Session Get list of all distribution groups $groups = Get-DistributionGroup -ResultSize unlimited Loop through each group and get its members foreach ($group in $groups) {Write-Host "Group: $($group.Name)"$members = Get-DistributionGroupMember -Identity $group.Name -ResultSize unlimitedforeach ($member in $members)... Continue Reading →

Mailbox Calendars Permissions For All Users

Following power shell commands can be used to get a list of all Exchange user's mailbox calendar permissions. Output will list all users along with the users that have permission to their calendars and also permission level. $Mailboxes = (get-mailbox -database dbname) $Mailboxes | ForEach {Get-MailboxFolderPermission -Identity “$($_.alias):\Calendar” | Select User, Identity, AccessRights} You can... Continue Reading →

Email Forwarding Report

Recently, I worked on getting a report of all users who have Email forwarding enabled. Users can have forwarding enabled at their mailbox level and / or mailbox rules. Forwarding Enabled on Mailbox Level: Get-Mailbox -Organizationalunit "OU Path" | where {$_.ForwardingAddress -ne $null} | ft -wrap -autosize Name, ForwardingAddress, DeliverToMailboxAndForward Forwarding Set up using Mailbox... Continue Reading →

Blocked Active Sync Device

I have recently come across an issue where a device status was Blocked. It was Allowed from Exchange Online portal but after refreshing it, it goes back to the Blocked state. I ran the following command on exchange power shell to find out the device ID of the device that was in Blocked status. Make... Continue Reading →

Create a website or blog at WordPress.com

Up ↑