how to use AQSstring in Public Folder -EWS Query

Hi 

I want use AQSstring for finditem in EWS Public folder Query then i am using following query

$Range = "7/1/2015..7/17/2015"       $AQSString = "System.Message.DateReceived:" + $Range

$fldId = FolderIdFromPath -FolderPath $Paths $SubFolderId =  new-object Microsoft.Exchange.WebServices.Data.FolderId($fldId)   $PubFolder  = [Microsoft.Exchange.WebServices.Data.Folder]::Bind($service,$SubFolderId)   $psPropset= new-object Microsoft.Exchange.WebServices.Data.PropertySet([Microsoft.Exchange.WebServices.Data.BasePropertySet]::FirstClassProperties)   $psPropset.RequestedBodyType = [Microsoft.Exchange.WebServices.Data.BodyType]::Text #Define ItemView to retrive just 1000 Items     $ivItemView =  New-Object Microsoft.Exchange.WebServices.Data.ItemView(1000)     $fiItems = $null      $fiItems = $service.FindItems($PubFolder.Id,$AQSString,$ivItemView) 


But i got following error

Error processing  : Exception calling "FindItems" with "3" argument(s): "One or more folders specified in folder scope for indexed search is not a mailbox folder. Indexed search is not supported on public folders."

then Without using AQSString in Finditems is working Perfectly but i need to use AQSString. Pls Help me...

Thanks

Manidurai.M

 




  • Edited by manidurai 19 hours 17 minutes ago
July 17th, 2015 8:11am

The error is telling you that public folders do not support AQS string searches. You have to use a search filter instead.

Free Windows Admin Tool Kit Click here and download it now
July 17th, 2015 10:29am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics