none
how to use AQSstring in Public Folder -EWS Query RRS feed

  • Question

  • 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 Friday, July 17, 2015 12:10 PM
    Friday, July 17, 2015 12:06 PM

All replies

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

    Friday, July 17, 2015 2:25 PM
    Moderator