Forum Discussion
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 years ago
- 5 months ago
- 5 months ago