@echo off

REM Set the value for how many folders Outlook should display
REM Note: this should be at least 500 (Outlook's default value)
set FOLDER_LIMIT=1000

REM Create the registry key and value to change Outlook's folder limit
reg add "HKLM\SYSTEM\CurrentControlSet\services\MSExchangeIS" /ve /f
reg add "HKLM\SYSTEM\CurrentControlSet\services\MSExchangeIS\ParametersSystem" /ve /f
reg add "HKLM\SYSTEM\CurrentControlSet\services\MSExchangeIS\ParametersSystem" /v objtFolderView /t REG_DWORD /d %FOLDER_LIMIT% /f
