This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
internet:mail:exchange:exchange_o365_powershell [2019/01/09 14:12] jcooper |
internet:mail:exchange:exchange_o365_powershell [2019/01/30 10:57] (current) jcooper |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== Connect to Office 365 Exchange via PowerShell ====== | ====== Connect to Office 365 Exchange via PowerShell ====== | ||
- | * On the machine you are connecting from install the **Microsoft Online Services Sign-in Assistant** module. | + | * On the machine you are connecting from install the '' |
https:// | https:// | ||
* Open PowerShell run as administrator. | * Open PowerShell run as administrator. | ||
* Allow remote signing. | * Allow remote signing. | ||
< | < | ||
- | Set-ExecutionPolicy RemoteSigned** | + | Set-ExecutionPolicy RemoteSigned |
</ | </ | ||
* Set cached credentials. You need the global admin account credentials | * Set cached credentials. You need the global admin account credentials | ||
Line 24: | Line 24: | ||
Remove-PSSession $Session | Remove-PSSession $Session | ||
</ | </ | ||
+ | |||
+ | ====== PowerShell rules commands ====== | ||
+ | |||
+ | https:// | ||
+ | |||
+ | https:// | ||
+ | |||
+ | * Get Inbox Rule | ||
+ | |||
+ | :!: To get the entire RuleIdentity you may need to widen the PowerShell window. | ||
+ | |||
+ | < | ||
+ | Get-InboxRule -Mailbox < | ||
+ | </ | ||
+ | * Get Inbox Rule and show what it does | ||
+ | < | ||
+ | Get-InboxRule –Mailbox < | ||
+ | </ | ||
+ | * Get Inbox Rule and show details | ||
+ | < | ||
+ | Get-InboxRule -Identity < | ||
+ | </ | ||
+ | * Remove Inbox rule | ||
+ | < | ||
+ | Remove-InboxRule -Identity < | ||
+ | </ | ||
+ | * Remove all Inbox rules | ||
+ | < | ||
+ | Get-InboxRule -Mailbox < | ||
+ | </ | ||
+ | |||
+ | |||