Error: Timeout exceeded during script execution - MS Office SharePoint monitor

Error: Timeout exceeded during script execution - MS Office SharePoint monitor

The "Timeout exceeded during script execution" error usually occurs in the SharePoint Server monitor added in PowerShell mode.
Run the below Measure-Command to measure the time taken for the script to be executed or the individual commands to be executed.
Quote
Syntax:
Measure-Command{ <script-or-command> }

Example for script:
Measure-Command{ .\SPMaster.ps1 'hostname' 'username' 'password' 'WebApplication,TimerJobs,ContentDB,SharepointServices' 'CredSSP' }

Example for command:
Measure-Command{ Invoke-Command -Session $session -ScriptBlock{ Get-SPServiceInstance } }
Post-execution, note the total time taken for the command/script to be executed. Go to Applications Manager → MS Office SharePoint monitor → Edit Monitor, and update the Polling Interval and Timeout value with a buffer, based on the measured time.

                  New to ADSelfService Plus?