Export User and User’s manager info to a CSV file


I had to export members of a group, and each member's manager into a CSV file to generate a specific report. I wrote a quick PowerShell command for On-Premises Active Directory and for Azure AD. Here is the PowerShell command for On-Premises Active Directory. Replace GroupName with your own security group name in the beginning … Continue reading Export User and User’s manager info to a CSV file

PowerShell – List all Domain Controllers


How to list all Domain controllers in PowerShell? There is no built-in cmdlet in the "Active Directory" module. I found the commands to list the domain controllers and wished to share them with others. So here they are. First command with a super simple concept. Just list all objects in "Domain Controllers" OU. Get-ADComputer -SearchBase … Continue reading PowerShell – List all Domain Controllers

Exchange: How to list memberOf groups of a user?


Since this blog exists to explain how to list "memberof" groups of a DL, I am blogging again for user. There is no easy command to list all groups the user is member of. There is a little workaround to get the information from PowerShell. User Member of which groups On-Premises Using AD cmdlets because … Continue reading Exchange: How to list memberOf groups of a user?

Exchange Mailbox is Full and Cannot delete emails – “You can’t permanently delete these items”


A Mailbox is full and reached its limit. The user is trying to empty out "Deleted Items" in Outlook, and it throws "You can't permanently delete these items". And, the user goes to "Recoverable Items" and tries to purge items in Outlook. They couldn't purge items either. Now what? It happens because SingleItemRecoveryEnabled for the … Continue reading Exchange Mailbox is Full and Cannot delete emails – “You can’t permanently delete these items”

Exchange/Outlook: Emails sent as shared mailbox stored in Sent Items folder in my mailbox, Why?


Here is the setup. I have configured my mailbox in Outlook. I have added second mailbox to the same Outlook mail profile (usually a shared mailbox). I have send-as permissions on that shared mailbox. I sent email as the shared mailbox, those sent emails are freaking stored in Sent Items in MY MAILBOX. Why? Because … Continue reading Exchange/Outlook: Emails sent as shared mailbox stored in Sent Items folder in my mailbox, Why?

Exchange Online: Remove-Mailbox: The following error occurred during validation in agent ‘Windows LiveId Agent’: ‘Unable to perform the save operation. ‘SharedMailboxName’ is not within a valid server write scope.’


All you want to do is delete a Shared Mailbox in Exchange Online. But it is stupidly stubborn. It doesn't want to delete. All you get is Remove-Mailbox: The following error occurred during validation in agent 'Windows LiveId Agent': 'Unable to perform the save operation. 'SharedMailboxName' is not within a valid server write scope.' SOLUTION: … Continue reading Exchange Online: Remove-Mailbox: The following error occurred during validation in agent ‘Windows LiveId Agent’: ‘Unable to perform the save operation. ‘SharedMailboxName’ is not within a valid server write scope.’

Exchange Online: Cannot replace PrimarySMTPAddress of a mailbox


You try to replace the Primary email address (PrimarySMTPAddress) OR a secondary email address/Alias on a mailbox in Exchange Admin Center. After replacing the email address, you save the changes. Reopen the mailbox properties, you see the FREAKING primary email address still FREAKING there. I am sure you tried to replace the email address using … Continue reading Exchange Online: Cannot replace PrimarySMTPAddress of a mailbox

Is ADMT Driving you Crazy? This operation requires that auditing be enabled for Success and Failure auditing of account management operations.


According to ADMT 3.2: Interforest Migration - Part 3 - TechNet Articles - United States (English) - TechNet Wiki (microsoft.com) you enable Success and Failure for the policy "Audit account management" in Default Domain Controllers Policy. Now you are trying to migrate users or groups or computers using ADMT console. You get this freaking error: … Continue reading Is ADMT Driving you Crazy? This operation requires that auditing be enabled for Success and Failure auditing of account management operations.

Exchange: Prevent sending Out of Office replies from Group/DL Members back to the Senders


I have been asked to prevent sending Out of Office replies from a DL members to the senders. The context of the request is the DL is published externally to the customers. If the customers send email to get help, we don't want to send Out of Messages back to the customers. This is super … Continue reading Exchange: Prevent sending Out of Office replies from Group/DL Members back to the Senders