Purpose
To check it
Gonsystem: Windows - Linux - Servers - Redes - Cisco - Comunicaciones - Monitorización - Seguridad
Purpose
Purpose
Add the following commands to a *.PP1 file:
Import-Module grouppolicy
$date = get-date -format d.M.yyyy
$DNSServer="MYDC"
$Zones = @(Get-DnsServerZone -ComputerName $DNSServer)
$Data = @()
ForEach ($Zone in $Zones) {
$nombrefile = $date + $Zone.ZoneName + ".dns.bak"
dnscmd /zoneexport $Zone.ZoneName backup\$nombrefile
Copy-Item C:\Windows\System32\dns\
}
$PSEmailServer = "10.10.11.10"
Send-MailMessage -From no-reply@myhome.loca -To infrastructures@myhome.local -Subject "mycompay. Backups semanal DFS Mydom.LOCAL" -Body "Finalizada la copia de Backups de DFS en el servidor XXXXX"
by GoN | Published: Nov 1, 2021 | Last Updated:
Purpose
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\
$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: