Get Folder list and ID of a mailbox


To get a list of folders for a mailbox or site, you need to run a script. This script can be written in PowerShell or any other scripting language that is capable of interacting with the email service. Once the script is executed, it will access the mailbox or site and retrieve the list of folders available. This list can then be saved to a file or displayed on the screen for further analysis. Running the script is a simple process and can be done by following the instructions provided with the script. It is important to ensure that the necessary permissions are in place before running the script to avoid any issues. With the list of folders, it becomes easier to manage emails or files within the mailbox or site.


  1. Download this script or manually create it from MSFT.

  2. Transfer the file to your root drive (C:)


  3. Open PowerShell > change directory to the root drive

  4. Instead of displaying a list of folders on the computer screen, you can re-direct the output of the script to a text file. This file will be saved to the folder where the script is located. For example, to redirect the script output to a text file, run the following command.

    .\GetFolderSearchParameters.ps1 > StacigFolderIds.txt  

    exo-get-list-folderid-mailbox-img-2 exo-get-list-folderid-mailbox-img-3