Basic Exchange Rule Management via Exchange Management Shell
- February 9th, 2017
- Write comment
New-InboxRule in EMS has many options. I have just listed a very simple example here. Get-Help New-InboxRule is your friend.
This will set a rule to delete any email sent to this mailbox:
New-InboxRule -Mailbox mailbox -Name “rulename” -Delete $true
Get-Contant by itself will list all contacts. If you pass Get-Contact a contact name, it will only return that contact:
Get-Contact “contactname”
To list a particular rule for a particular mailbox:
Get-InboxRule -Mailbox mailbox -Identity “rulename“
To disable a rule for a mailbox:
Disable-InboxRule -Mailbox mailbox -Identity “rulename“
To enable a rule for a mailbox:
Enable-InboxRule -Mailbox mailbox -Identity “rulename“
To get list of your command history. This is dependent on the $MaximumHistoryCount variable. I think the default is 32.
Get-History