User Tools

Site Tools


internet:mail:exchange:exchange_o365_powershell

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
internet:mail:exchange:exchange_o365_powershell [2019/01/09 14:11]
jcooper
internet:mail:exchange:exchange_o365_powershell [2019/01/30 10:57] (current)
jcooper
Line 1: Line 1:
-====== Connect to Office 365 Outlook via PowerShell ======+====== Connect to Office 365 Exchange via PowerShell ======
  
-  * On the machine you are connecting from install the module.+  * On the machine you are connecting from install the ''Microsoft Online Services Sign-in Assistant'' module.
 https://www.microsoft.com/en-us/download/details.aspx?id=41950 https://www.microsoft.com/en-us/download/details.aspx?id=41950
   * Open PowerShell run as administrator.   * Open PowerShell run as administrator.
   * Allow remote signing.   * Allow remote signing.
 <file> <file>
-Set-ExecutionPolicy RemoteSigned**+Set-ExecutionPolicy RemoteSigned
 </file> </file>
   * 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
 </file> </file>
 +
 +====== PowerShell rules commands ======
 +
 +https://www.codetwo.com/admins-blog/managing-outlook-rules-powershell/
 +
 +https://docs.microsoft.com/en-us/powershell/module/exchange/mailboxes/remove-inboxrule?view=exchange-ps
 +
 +  * Get Inbox Rule
 +
 +:!: To get the entire RuleIdentity you may need to widen the PowerShell window.  Properties, Layout, window size, width. 
 +
 +<file>
 +Get-InboxRule -Mailbox <mailbox_name>
 +</file>
 +  * Get Inbox Rule and show what it does
 +<file>
 +Get-InboxRule –Mailbox <mailbox_user> | Select Name, Description | FL
 +</file>
 +  * Get Inbox Rule and show details
 +<file>
 +Get-InboxRule -Identity <RuleIdentity> -Mailbox <mailbox_user> | FL
 +</file>
 +  * Remove Inbox rule
 +<file>
 +Remove-InboxRule -Identity <rule_name> -Mailbox <mailbox_name>
 +</file>
 +  * Remove all Inbox rules
 +<file>
 +Get-InboxRule -Mailbox <mailbox_name> | Remove-InboxRule
 +</file>
 +
 +
  
internet/mail/exchange/exchange_o365_powershell.1547068274.txt.gz · Last modified: 2019/01/09 14:11 by jcooper