Select-Email Cmdlet
Searches IMAP data.
Syntax
Select-Email [parameters]
Remarks
The Select-Email cmdlet allows you to use a syntax similar to SQL SELECT statements to search IMAP data.
$conn = Connect-Email -Port 993 -Server 'outlook.office365.com' -Password 'password' -User 'user' -Protocol 'IMAP' -SMTPPort 587 SMTP Server 'smtp.office365.com'
Select-Email -Connection $conn -Table "[INBOX]" -Columns @("From","Subject") -Where "Subject='Test'"