This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | Next revision Both sides next revision | ||
public:microsoft_exchange_mail_level [2019/08/20 14:36] ronnie.chan |
public:microsoft_exchange_mail_level [2019/08/20 14:43] ronnie.chan |
||
---|---|---|---|
Line 88: | Line 88: | ||
</code> | </code> | ||
+ | Other useful commands: | ||
+ | <WRAP indent> | ||
+ | 1. To show added permission for an AD account | ||
+ | <code> | ||
+ | Get-MailboxServer | Get-ADPermission -User "%os_username%" | ||
+ | </code> | ||
+ | Example, to show added permission for local account "system" | ||
+ | <code> | ||
+ | Get-MailboxServer | Get-ADPermission -User "system" | ||
+ | </code> | ||
+ | |||
+ | 2. To remove permission from an AD account | ||
+ | <code> | ||
+ | Get-MailboxServer | Remove-ADPermission -User "%os_username%" - AccessRights GenericAll -ExtendedRights ms-exch-store-admin,receive-as,send-as -InheritanceType All | ||
+ | </code> | ||
+ | |||
+ | Example, to remove permission from local account "system" | ||
+ | <code> | ||
+ | Get-MailboxServer | Remove-ADPermission -User "system" - AccessRights GenericAll -ExtendedRights ms-exch-store-admin,receive-as,send-as -InheritanceType All | ||
+ | </code> | ||
+ | </WRAP> | ||
+ | Reboot the Exchange Server after executing the command. | ||
+ | |||
+ | === Exchange Server 2010 / 2013 === | ||
+ | Enter the following command in Exchange Management Shell | ||
+ | <code> | ||
+ | Get-Mailbox | Add-MailboxPermission -User "%os_username%" -AccessRights FullAccess | ||
+ | </code> | ||
+ | |||
+ | Example: granting permission to local account "system" | ||
+ | <code> | ||
+ | Get-Mailbox | Add-MailboxPermission -User "system" -AccessRights FullAccess | ||
+ | </code> | ||
+ | |||
+ | Other useful commands: | ||
+ | <WRAP indent> | ||
+ | 1. Remove permission from an AD account | ||
+ | <code> | ||
+ | Get-Mailbox | Remove-MailboxPermission -User "%os_username%" -AccessRights FullAccess | ||
+ | </code> | ||
+ | |||
+ | Example: | ||
+ | <code> | ||
+ | Get-Mailbox | Remove-MailboxPermission -User "system" -AccessRights FullAccess | ||
+ | </code> | ||
+ | |||
+ | 2. To view the mailbox permission of a user | ||
+ | <code> | ||
+ | Get-Mailbox | Get-MailboxPermission -User "%os_username%" | ||
+ | </code> | ||
+ | |||
+ | Example: | ||
+ | <code> | ||
+ | Get-Mailbox | Get-MailboxPermission -User "system" | ||
+ | </code> | ||
+ | </WRAP> | ||
+ | Reboot the Exchange Server after executing the command. | ||
</WRAP> | </WRAP> |