Redemption Outlook MAPITable and UserProperties Q

放肆的年华 提交于 2019-12-25 01:04:11

问题


I have written some powershell, which checks a bunch of users mailboxes, and checks a specific property using a Mapitable. However I need to count the UserProperties also, and i'm struggling to do this in conjunction with the MapiTable - Ideally i'd like it to be "select blah from blah where userproperties.count = 4 AND crmregardingID IS NOT NULL"

Here's the snippet of code:

$sSqlQuery = 'Select Subject, senderName, MessageClass, ReceivedTime From $oFolName where "http://schemas.microsoft.com/mapi/string/{00020329-0000-0000-C000-000000000046}/crmRegardingId" IS NOT NULL'
$CurrFold = $RSession.GetFolderFromID($oDefFolder.EntryID)

$RTable.Item = $CurrFold.Items

$RecordSet = $RTable.ExecSQL($sSQLQuery)
if($recordset.recordcount -gt 0){
write-host "running loop"
Do STUFF
$recordset.Movenext()} until
    ($Recordset.EOF -eq $true )
$recordset.close()
$RSession.Logoff()
}

All help much appreciated :)


回答1:


User properties definitions are stored as a blob in a special named property. The only way to get the UserProperties collection is to open the message as RDOMail object; you cannot do that using ExwecSQL.



来源:https://stackoverflow.com/questions/16188105/redemption-outlook-mapitable-and-userproperties-q

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!