Scripts de monitorización

Listado de scripst para monitorizar Exchange

 

Test-ExchangeServerHealth.ps1 (Exchange 2010/2013/2016) Download

http://exchangeserverpro.com/powershell-script-exchange-server-health-check-report/

This PowerShell script will perform a health check of your Exchange Server environment, including servers and database availability groups, and output a HTML report that you can send to your inbox.

Parametros

  • -Server, Perform a health check of a single server
  • -ReportMode, Set to $true to generate a HTML report. A default file name is used if none is specified.
  • -ReportFile, Allows you to specify a different HTML report file name than the default.
  • -SendEmail, Sends the HTML report via email using the SMTP configuration within the script.
  • -AlertsOnly, Only sends the email report if at least one error or warning was detected.
  • -Log, Writes a log file to help with troubleshooting.

Ejemplos

Checks all servers in the organization and outputs the results to the shell window.

  • .\Test-ExchangeServerHealth.ps1

Checks the server HO-EX2010-MB1 and outputs the results to the shell window.

  • .\Test-ExchangeServerHealth.ps1 -Server HO-EX2010-MB1

Checks all servers in the organization, outputs the results to the shell window, a HTML report, and emails the HTML report to the address configured in the script.

  • .\Test-ExchangeServerHealth.ps1 -ReportMode –SendEmail

Dentro del script modifivamos la seccion de Email, para que nos lo envie a nuestro correo


Usaremos ignorelist.txt (en la raíz del script) para especificar los nombres de cualquier DAG, servidor o base de datos a excluir del test

Si queremos planificar la tarea (valido para todos los scrits de esta pagina


  • On the Trigger section, choose your schedule that fits your needs.
  • 4. On the Action, choose “Start a program” Click Next.
  • 5. On the “Start a Program” subsection, Enter
    • Program: C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
    • Arguments: -command . ‘c:\Program Files\Microsoft\Exchange Server\V14\bin\RemoteExchange.ps1’; Connect-ExchangeServer -auto;
      C:\Scripts\Test-ExchangeServerHealth.ps1 -Log –SendEmail

 

FAQ

Q: Which version of PowerShell is required?

If you are running the script on a server that has Exchange 2010 or 2013 (or later) server roles or management tools installed then it should work.

Q: I’m running multiple versions of Exchange, will the script still work?

Yes, it should work as long as you run it from the highest version of Exchange. For example, in a mixed Exchange 2010/2013 environment you should run the script from an Exchange 2013 server.

Q: Why do I get an error when the script sends the email report?

Make sure you’ve configured the email settings section of the script to point to a Hub Transport that either accepts anonymous users (typically an internet-facing Hub Transport), or if you’re using a separate management server or admin workstation point the SMTP server to a Hub Transport that has a receive connector set up that the server you’re running the script on is allowed to relay through.

Q: Why aren’t Edge Transport servers checked?

Between firewalls and permissions the Edge Transport checks are difficult to account for so they are currently skipped by the script.


 

Get-CorpEmailReport_v2.4.9 (Bueno. Ejecutar en el servidor Exchange) Download

https://gallery.technet.microsoft.com/Get-CorpEmailReport-8d708025

Generate the HTML report and supplying the current directry as a script path to create output files

.\Get-CorpEmailReport.ps1 -ScriptFilesPath .\

Generate the HTML report and supplying the custom directory as a script path to create output files

.\Get-CorpEmailReport.ps1 -ScriptFilesPath C:\MyFiles

Generate the HTML report and Filter by servers that start with “NL”

.\Get-CorpEmailReport.ps1 -ScriptFilesPath .\   -ServerFilter “NL*”

Generate the HTML report and Filter by including only Ex1 and Ex2 servers

.\Get-CorpEmailReport.ps1 -ScriptFilesPath  .\  -OnlyIncludedServers  Ex1,Ex2

Generate the HTML report and Filter by including only Servers that are member of a DAG called “DAG1″

.\Get-CorpEmailReport.ps1 -ScriptFilesPath .\  -InputDAGs  DAG1

Generate the HTML report and use PowerShell Remoting for WMI data collection

\Get-CorpEmailReport.ps1 -ScriptFilesPath .\  -WMIRemoting

Generate the HTML report with SMTP Email option

\Get-CorpEmailReport.ps1 -ScriptFilesPath .\  -SendMail:$true -MailFrom noreply@contoso.com-MailTo me@contoso.com -MailServer smtp.contoso.com

Generate the HTML report with disabling ViewEntireForest option

\Get-CorpEmailReport.ps1 -ScriptFilesPath .\  -ViewEntireForest:$false

Get-ExchangeEnvironmentReport(2003-2016) (Bueno) Download


Nos muestra información de los mailboxex, tamaño base datos y demás información

.\Get-ExchangeEnvironmentReport(2003-2013).ps1′ -htmlreport -FilePath .\OK.html


 

E2K10_Architecture_GUI_V2.02 (muy completo) Download

Muestra un report de nuestra infraestructura

 

 

 

 

Tenemos que copiar la carpeta Scripst que viene con el PS1, a la ruta en donde esta esté powershell, así nos m mostrara todo. Nos generara un HTML. Esto es un ejemplo.

 

2010_health_check_html Download

Nos envía por correo un report del estado del servidor

  • 2010_health_check_html.ps1 –EmailTo administrator@minjus.es

 

Exchange Server Mailbox Statistics (regular)
Download


Estadisticas de Servidrr, base de datos y de buzones


Estadísticas a nivel de Base de datos (botón Database). Casa lo mismo para usuarios especificos

 

 

Get-MailboxReport.ps1 Download

http://exchangeserverpro.com/powershell-script-create-mailbox-size-report-exchange-server-2010/

One of the Exchange Server administration tasks I perform almost every day is creating mailbox size reports. There are a few different reasons that I create these reports, such as

  • planning a mailbox migration project,
  • responding to a storage capacity alert for a particular database,
  • or providing a specific team of people with a report of their mailbox sizes.

Ejemplos

Get-Help .\Get-MailboxReport.ps1 –full

  • Get-MailboxReport.ps1 –mailbox pepe
    // la query aparecera en la consola de Windows


  • Get-MailboxReport.ps1 –database BD01


  • Get-MailboxReport.ps1 –file BD01


 

  • Get-MailboxReport.ps1 –server EX01


Get-MailboxReport.ps1 –all

Para el resto, la salida ira a CSV en la misma ruta del script


 

Get-DailyBackupAlerts
Download

Nos muestra si se hizo backup en la base de datos. Solo lo envía por mail, hay que editar el PS1 y poner nuestros datos de mail

 

Exchange2010DailyCheckList
Download

Nos reporta un html en la misma ruta del script sobre DAG y el sataus de las copias. Es smlple

 

GetMessageStatsToFile
Download

Nos muestra estadosticas de los correos enviados y recibidos X días atrás por usuarios

 

CommonDag & Database Tasks GUI V1
Download

 

MessageTrackingGUI Download

 

Get-MailingGroupsReport Download

Estadisticas de grupo. Genera un html en la ruta del PS1 Y puede enviarnos mail con el report y una par de Excel adjuntos editando el PS1 para la dirección


Be the first to comment

Leave a Reply