Forefront Protection for ExchangeComments (0)

Comments

You need sign in to comment! Sign up today!

How to display various antispam/antivirus statistics in Forefront Management ShellComments (1)

In Forefront Management Console we can see tons of statistics but we cant specify day, week, month and so forth. By default it can only show the total number which can be enough sometimes.

But to user Powershell to get pin-pointed information we could use some cmdlets.

To display total Antivirus report
Get-FseReport -Type Total
Get-FseReport -Type Total | fl (will display additional information)

To display Antispam report between 24/03/2011 08:30 AM and 25/03/2011 09:00 AM
Get-FseSpamReport –StartTime "24.03.2011 08:30" –EndTime "25.03.2011 09:00"

Today Script

#######################
# Forefront Spamreport Today
#######################
Param ([system.Datetime] $date = $(get-date -format "MM/dd/yyyy"))

$start = $date
$end = $date.addDays(1)

Write-Output $("Spam Report from {0} to {1}" -f $start,$end)
Get-FseSpamReport -Starttime $start -Endtime $end


Yesterday Script
#######################
# Forefront Spamreport Yesterday
#######################

Param ([system.Datetime] $date = $(get-date -format "MM/dd/yyyy"))

$start = $date.addDays(-1)
$end = $date

Write-Output $("Spam Report from {0} to {1}" -f $start,$end)
Get-FseSpamReport -Starttime $start -Endtime $end


Last Week Script
#######################
# Forefront Spamreport Last Week
#######################

Param ([system.Datetime] $date = $(get-date -format "MM/dd/yyyy"))

$start = $date.addDays(-7)
$end = $date

Write-Output $("Spam Report from {0} to {1}" -f $start,$end)

Get-FseSpamReport -Starttime $start -Endtime $end


Last Month Script
#######################
# Forefront Spamreport Last Month
#######################

Param ([system.Datetime] $date = $(get-date -format "MM/dd/yyyy"))

$numdays = $date.Day
$end = $date.AddDays(-$numdays)
$numdays = $end.Day
$start = $end.AddDays( -$numdays + 1)

Write-Output $("Spam Report from {0} to {1}" -f $prevmonthfirstday,$prevmonthlastday )

Get-FseSpamReport -Starttime $prevmonthfirstday -Endtime $prevmonthlastday


We could also use an output feature to export this into HTML:
ConvertTo-HTML | Out-File C:\Scripts\Data.htm

To start IE displaying this page:
Invoke-Expression C:\Scripts\Data.htm

Comments

DavidBenedict Oct 26, 2016 - 05:37
If you want to repair corrupt and damaged MS Exchange Server databases (EDB) files, you can download more effective software, Edb to Pst converter software.This software is easy to use and also converts archive mailboxes as well as support upto Exchange Server version 2016. and this utility which recovers all types of data on Exchange Server such as attachments, messages, calendars, contacts, drafts, tasks, notes, journals, distribution lists, appointments, sent items, completely deleted emails, sub-folders, directories and etc. See full info :- http://www.tools4recovery.com/edb-to-pst-converter.html

You need sign in to comment! Sign up today!