Timeout exceeded during script execution

Timeout exceeded during script execution

This error occurs when some powershell scripts take longer time than the mentioned timeout value when Exchange server monitor is added in Powershell mode.

1. Try polling the monitor and check if the error continues to retain. 
2. Open powershell in administrator mode in the AppManager installed machine.
3. Go to <AppManager-Home>\working\conf\application\scripts\powershell
4. Run the below commands by replacing hostname, username and password with that of the reported Exchange server to find the time taken for the execution of each script.
            Measure-Command{.\EX_CommonCounters.ps1 'hostname' 'username' 'password'}
If Mailbox role (2010 and above):
            Measure-Command{.\E201X_MBX_Tables.ps1 'hostname' 'username' 'password'}
If Mailbox role (2007):
            Measure-Command{.\E2007_MBX_Tables.ps1 'hostname' 'username' 'password'}
If Admin -> Performance Polling -> Optimize data collection -> Monitor Type as Exchange Server and Data collection enabled for Top Mailboxes by Size, Inactive Mailbox Users and Exchange Queues
            Measure-Command{.\EX_Mailboxes.ps1 'hostname' 'username' 'password' 'TopMailboxes,InactiveMailboxes,ExchangeQueues'}
For Version 2013 and above :
            Measure-Command{.\E2013_ComponentStates.ps1 'hostname' 'username' 'password'}
Choose the script file from below list based on version and role and run this command
            Measure-Command{.\<scriptname> 'hostname' 'username' 'password'}
  1. Exchange 2019 Mailbox Role - E2019_MBX_Counters.ps1
  2. Exchange 2019 Edge Transport Role - E2016_EDGE_Counters.ps1
  3. Exchange 2016 Mailbox Role - E2016_MBX_Counters.ps1
  4. Exchange 2016 Edge Transport Role - E2016_EDGE_Counters.ps1
  5. Exchange 2013 Mailbox Role - E2013_MBX_Counters.ps1
  6. Exchange 2013 Client Access Role - E2013_CAS_Counters.ps1
  7. Exchange 2013 Edge Role - E2013_EDGE_Counters.ps1
  8. Exchange 2010 Mailbox Role - E2010_MBX_Counters.ps1
  9. Exchange 2010 Client Access Role - E2010_CAS_Counters.ps1
  10. Exchange 2010 Edge/Hub Transport Role - E2010_TRANSPORT_Counters.ps1
  11. Exchange 2010 Unified Messaging Role - E2010_UM_Counters.ps1
  12. Exchange 2007 Mailbox Role - E2007_MBX_Counters.ps1
  13. Exchange 2007 Client Access Role - E2007_CAS_Counters.ps1
  14. Exchange 2007 Hub Transport Role - E2007_HUB_Counters.ps1
  15. Exchange 2007 Edge Transport Role - E2007_EDGE_Counters.ps1
  16. Exchange 2007 Unified Messaging Role - E2007_UM_Counters.ps1
  17. Exchange 2003 and Below - E2003_Counters.ps1
5. Check the time taken for the script execution and based on that set the Timeout and Polling interval in the Edit monitor page and poll the monitor.


                  New to ADSelfService Plus?

                    • Related Articles

                    • Script Monitor FAQs

                      Common queries, errors and troubleshooting: 1. To execute scripts other than .bat /.vbs  in Windows and .sh / .bash in Linux: It is better to execute the script in the form of a command. Eg. To execute python script, you can use command py ...
                    • Script/Custom Monitors - Alarms configured for Table rows were missing

                      In the Applications manager , users have the ability to manage the table rows of a script or custom monitor type according to their specific requirements. This can be done by enabling the "Enable Script Row Deletion" option. For example, let's ...
                    • How to configure Output Settings for Script Monitor?

                      Below are the details on how to configure Script Monitor Output Settings and expected output format, Output Configuration: Expected Output File Format: In the output file, Scalar data should be separated by scalar delimiter, here name, cpu, javaHeap ...
                    • Steps to resolve APM - .NET Core Agent's `AgentDiagnoser.ps1` PowerShell Script Execution failure due to Digital Signature Error

                      When attempting to run a APM - .NET Core Agent PowerShell script "AgentDiagnoser.ps1" to generate agent diagnostics, you may encounter an error indicating that the script cannot be loaded because it is not digitally signed. This issue can occur due ...
                    • How to execute SAP Debug script

                      1. Steps to execute troubleshooting script SAPDebug.bat/sh: Open command prompt/terminal with administrator privileges. Navigate to <AppManager_home>\bin\troubleshooting folder. Execute the script file SAPDebug.bat or SAPDebug.sh Usage: SAPDebug.bat  ...