Cmdlets for Email

Build 23.0.8839

Update-Email Cmdlet

Parameters   Output Objects  

Updates IMAP data.

Syntax

Update-Email [parameters]

Remarks

The Update-Email cmdlet allows you to use a syntax similar to SQL UPDATE statements to update IMAP data.

$conn = Connect-Email -Port 993 -Server 'outlook.office365.com' -Password 'password' -User 'user' -Protocol 'IMAP' -SMTPPort 587 SMTP Server 'smtp.office365.com'
Update-Email -Connection $conn -Table "[INBOX]" -Columns @("Subject") -Values @("A Message Subject") -Id "1"
The Where parameter can also be used to specify the primary key of the table:
Update-Email -Connection $conn -Table "[INBOX]" -Columns @("Subject") -Values @("A Message Subject") -Where "Id = '1'"
The primary key can also be passed to the cmdlet along the pipeline:
Select-Email -Connection $conn -Table [INBOX] -Where "Subject = 'Test'" | Update-Email -Columns @("Subject") -Values @("Test 2")

Copyright (c) 2024 CData Software, Inc. - All rights reserved.
Build 23.0.8839