Perform different operations using EWS api

UPDATE 02/15/2019Added 2 columns to folder lists methods 1-6 : TotalItemsCount, # of SubfoldersUPDATE 04/16/2018Optimized logon options. If we choose 'Office 365', we will not use SCP and we hard-code EXO endpoint.UPDATE 03/13/2018Added new method "Remove OWA configurations"DESCR

425 times
Add to favorites
Office 365
E-mail Twitter Digg Facebook
Sign in to ask a question

  • Hello, I tried this script.I tried doing process 12.
    3 Posts | Last post October 27, 2018
    • I entered the folder ID in hexadecimal form and Base 64 form also. But it gives me an error
         Exception calling "Bind" with "2" argument(s): "Id is malformed."
      At line:296 char:9
      +         $Folder = [Microsoft.Exchange.WebServices.Data.Folder]::Bind( ...
      +         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
          + FullyQualifiedErrorId : ServiceResponseException
      Exception calling "FindItems" with "3" argument(s): "The element at position 0 is invalid
      Parameter name: parentFolderIds"
      At line:327 char:10
      +             $fiItems = $service.FindItems($Folder.Id, $searchFilter,  ...
      +             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
          + FullyQualifiedErrorId : ArgumentException
      Please let me know how to proceed regarding this 
    • Shruti,
      I have tested the script and works fine for me.
      please use methods 1 and 4, to see all your folders and their respective FolderID. later use those IDs in method 12.
    • Agustin,
      Thank you so much for your help. The issue is resolved.
      Just for my knowledge, I wanted to know that the folder ID which I found from get-mailboxfolderstatistics is different from the ID which I get after running method 2. Could you let me know the details about these ID's.