lunes, 1 de noviembre de 2021

WINDOWS. PS. DFS Export

Purpose

How to make a script to export the DFS information

Steps

Add the following commands to a *.PP1 file:

Import-Module grouppolicy

$date = get-date -format M.d.yyyy

 $Filename=$date + "DFS.txt"

 dfsutil root export \\midomain.local\datos C:\Backups\DFS\$Filename

 Copy-Item "C:\Backups\DFS\$Filename" -Destination \\midomain\Backups\DFS

$PSEmailServer = "10.10.11.10"

Send-MailMessage -From no-reply@myhome.loca -To infrastructures@myhome.local -Subject "mycompay. Backups semanal DFS mydomain.LOCAL" -Body "Finalizada la copia de Backups de DFS en el servidor XXXXX"

by GoN | Published: Nov 1, 2021 | Last Updated:

martes, 13 de abril de 2021

NAGIOS. System Uptime

 Purpose

Check how many days a host has gone without restarting or shutting down.

Steps

A Critical Alert when 1 year without restarting or shutting down.

Commandcheckuptime

Check NagiosXI
by GoN | Published: Apr 13, 2020 | Last Updated:

NAGIOS. Check Time vs Domain

Purpose

Check the time in all servers. 

We configure the Nagios NTP service to synchronize to Windows PDC DC.

Steps

A Warning Alert when 30 seconds to go and Critical Alert when 60 seconds to go for all Servers

Command: checktime


Check NagiosXI
by GoN | Published: Apr 13, 2020 | Last Updated: