Home » Posts tagged 'PowerShell'
Tag Archives: PowerShell
This blog will help you to Troubleshoot Issues related to Database Latency and Disk space. Also this will be helpful to find the root cause.
Managing Exchange 2010 server organization in a production environment Exchange Administrator needs to keep track of things like
1: Database Latency
2: Disk Space problems
3: Search issues etc…..
To isolate and resolve such issues most of the Admin use Event id and use EMC rather than these there most useful to Admin is such scenarios is EMS. Yes, PowerShell like booster to admin to solve such scenarios much faster with less effort. To help the Exchange Admin there is inbuilt scripts in our Exchange server itself.
These scripts are available in Scripts folder.
These PowerShell scripts are located in the \Program Files\Microsoft\Exchange Server\V14\Scripts folder.
And they are ready to use few scripts shown below:
- Database Latency Troubleshooter(Troubleshoot-DatabaseLatancy.ps1)
- Database Disk Space troubleshooter(Troubleshoot-DatabaseSpace.ps1)
- Content Index Troubleshooter(Troubleshoot-CI.ps1)
Let’s start with
The Database Latency Troubleshooter:
The Database Latency Troubleshooter (Troubleshoot-DatabaseLatency.ps1) is designed to monitor and perform troubleshooting on database latency. This script will check the below tasks and resolves.
- Disk latency
- Active Directory Latency
- RPC Latency
- Top CPU user
The below script will provide the latency and EventId as shown below:
Troubleshoot-Databaselatency.ps1 -MailboxDatabaseName <DatabaseID> [-latencyThreshold <1-200>] [-TimeinServerThreshold <1-600000>] [-Quarantine <switch>] [-MonitoringContext <switch>]
Below are few events that are generated
Logs generated on Database Space and Latency
Events related to Database Latency
The Database Disk Space Troubleshooter:
The Database Disk Space Troubleshooter (Troubleshoot-DatabaseSpace.ps1) is designed to monitor and perform troubleshooting on database disk space issues. This script will check and show the cause and this will be helpful for the Exchange Administrators:
- It tracks the top users that are generating logs
- It tracks the available disk space for both logs and database
Based on a disk space and time threshold, the troubleshooter has the option to Quarantine the top users.
Troubleshoot-DatabaseSpace.ps1 -MailboxDatabaseName <DatabaseID> [-PercentEdbFreeSpaceThreshold <1-99>] [-PercentLogFreeSpaceThreshold <1-99>] [-HourThreshold <1- 100000000>] [-Quarantine <switch>] [-MonitoringContext <switch>]
So after running this command you will get the information with eventid for more information about the events you can check in Event Viewer
Troubleshoot-DatabaseSpace.ps1 -Server <ServerID> [-PercentEdbFreeSpaceThreshold <1-99>] [-PercentLogFreeSpaceThreshold <1-99>] [-HourThreshold <1- 1000000000>] [-Quarantine <switch>] [-MonitoringContext <switch>]
The Content Index Troubleshooter:
The CI Troubleshooter (Troubleshoot-CI.ps1) is designed to monitor and perform troubleshooting on Content Index catalogs. It detects and resolves the following symptoms like :
- Deadlock: Exchange Search deadlocks waiting on threads from MSSearch
- Corruption: One or more search indices are corrupted
- Stall: Similar to deadlock in that the indices are not getting updated
- Backlog: The Search catalog is backlogged resulting in missing index searches
This troubleshooter can be used against the Database or the Server, also useful to detect and resolve.
C:\PS> .\Troubleshoot-CI.ps1 -database EX01-DB05
Detects and reports if there’s any problem with catalog for
database DB05. Does not attempt any Resolution.
C:\PS> .\Troubleshoot-CI.ps1 -database DB05 -symptom Stall
Detects if indexing on catalog for database DB05 is stalled. Does not attempt any Resolution.
C:\PS> .\Troubleshoot-CI.ps1 -database EX01-DB05 -Action DetectAndResolve
Detects and reports if there’s any problem with catalog for database DB01.
Attempts a Resolution of the problem.
Great with this we have learned Troubleshooting Database and related Issues.
For more Info about the Parameters used in this blog you can get in the below article
MCTS, MCITP | Exchange Server
Publisher @ Techrid.com