Forum Discussion
Most people will have these on their systems, it would be great if LM would report last successful backup and generate an alert if last nights didn\'t work.
Example of Exchange DB last backup script:rn = :computername
= [DateTime]::Now
Server: +
Current time: +
= get-MailboxDatabase -server -status
foreach ( in )
(
= .lastfullbackup
if (!)
(
= n/a
)
else
(
= -
= .TotalHours
= (0:N0) -f
)
= .lastincrementalbackup
if (!)
(
= n/a
)
else
(
= -
= .TotalHours
= (0:N0) -f
)
if ( -gt 24) ( = 0)
elseif ( -lt 24) ( = 1)
= new-object PSObject
| add-member NoteProperty -name Database -value .Name
| add-member NoteProperty -name Last Full Date -value
| add-member NoteProperty -name Last Full (hrs ago) -value
| Add-Member NoteProperty -name Last Inc (hrs ago) -value
| Add-Member NoteProperty -name backup -value
)
Related Content
- 2 months ago
- 11 days ago
- 2 years ago
- 8 months ago