赎回Outlook MAPITable和UserProperties Q [英] Redemption Outlook MAPITable and UserProperties Q

查看:99
本文介绍了赎回Outlook MAPITable和UserProperties Q的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经编写了一些powershell,它可以检查一堆用户邮箱,并使用Mapitable检查特定的属性. 但是,我还需要计算UserProperties,因此我很难与MapiTable结合使用- 理想情况下,我希望它是从blah中选择userproperties.count = 4并且crmregardingID不为空"

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"

这是代码段:

$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()
}

非常感谢所有帮助:)

推荐答案

用户属性定义作为blob存储在特殊的命名属性中.获取UserProperties集合的唯一方法是将消息作为RDOMail对象打开.您无法使用ExwecSQL做到这一点.

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.

这篇关于赎回Outlook MAPITable和UserProperties Q的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆