Sua melhor aposta é provavelmente pesquisar o arquivo de log do IIS em um intervalo razoavelmente pequeno para as solicitações que você está procurando.
O script PowerShell a seguir deve fazer o que você deseja. Obviamente, mude as variáveis para atender às suas necessidades.
# Directory of IIS log files
$Path = "C:\inetpub\logs\LogFiles\W3SVC1"
#Get the most recent log file from the directory
$File = Get-ChildItem $Path | sort LastWriteTime | select -last 1
# Get-Content gets the file, pipe to Where-Object and skip the first 3 lines.
$Log = Get-Content $File.FullName | where {$_ -notLike "#[D,S-V]*" }
# Replace unwanted text in the line containing the columns.
$Columns = (($Log[0].TrimEnd()) -replace "#Fields: ", "" -replace "-","" -replace "\(","" -replace "\)","").Split(" ")
# Count available Columns, used later
$Count = $Columns.Length
# Get all Rows that i Want to retrieve
$QueryString = "*GET*"
$Rows = $Log | where {$_ -like $QueryString}
# Create an instance of a System.Data.DataTable
$IISLog = New-Object System.Data.DataTable "IISLog"
# Loop through each Column, create a new column through Data.DataColumn and add it to the DataTable
foreach ($Column in $Columns) {
$NewColumn = New-Object System.Data.DataColumn $Column, ([string])
$IISLog.Columns.Add($NewColumn)
}
# Loop Through each Row and add the Rows.
foreach ($Row in $Rows) {
$Row = $Row.Split(" ")
$AddRow = $IISLog.newrow()
for($i=0;$i -lt $Count; $i++) {
$ColumnName = $Columns[$i]
$AddRow.$ColumnName = $Row[$i]
}
$IISLog.Rows.Add($AddRow)
}
#Format Log data into string for sending
$BodyString = ""
foreach( $Row in $IISLog.Rows ){
$BodyString = $BodyString + $Row.date + " " + $Row.time + " " + $Row.sip + " " + $Row.csuriquery + "'n"
}
# Variables for sending email
$MailServer = "NAME OF YOUR MAIL SERVER"
$FromAddress = ""
$ToAddress = ""
$Subject = ""
$SMTP = New-Object Net.Mail.SmtpClient($MailServer)
$SMTP.Send($FromAddress,$ToAddress,$Subject,$BodyString)
Eu usei as seguintes páginas para referência.