I am trying to send an email using PowerShell and outlook.
$Outlook = New-Object -ComObject Outlook.Application
While sending an email AIP box pops up for selecting a label.
Is there a way to set labels programmatically using PowerShell?
Thanks.
Yes, there is. You need to add a user property in the following format:
But I'd suggest exploring internals of Outlook mail items using MFCMAPI or
OutlookSpy
to find out the exact solution. So, try to set assign an AIP label manually then explore internals using these tools.