View and manage all user fax activity on fax server

windows 7windows-server-2008-r2

I have a Windows 2008 R2 Fax Server, and there are several standard domain users who send faxes but the majority of the faxes are sent automatically via a web application that resides on the fax server and runs with administrative rights.

But I need to have all the fax user accounts managed, making sure faxes are sent. And I would prefer using Windows Fax and Scan application from a user who is not an administrator. A standard user, but they would be able to "Resend" or "Cancel" bad faxes.

On the fax server (WORKGROUP non domain), I created a security group "Fax Power Users"… added a standard user who I want to be able to manage and see all the faxes, and gave them full control. Above the normal "Fax Users" security group.

Problem, is that this Fax Power User can connect via Windows Scan and Fax in windows 7… but they only see their faxes and not anyone else's faxes.

Am I missing a step? Is it possible?
Do I have to look at a 3rd party solution?

The simple way would be for this Power Fax User connect to the fax server with the administrator account that the faxes are being created by on the web application/fax server….. but this would be bad for security.

NOTE: Been tinkering with a syslog agent to monitor the fax server output.log and sending an email alert but seems to be the long way around. Window Events are vague, and would not be able to send any pertinent information to allow a standard user make adjustments in the fax queue.

Best Answer

To view all user fax activity on a server you can do the following: First enable activity logging for a fax server,

Open Fax Service Manager.

  1. In the left pane, right-click Fax, and then click Properties.
  2. On the Activity Logging tab, select the Log incoming fax activity check box to start logging incoming faxes and the Log outgoing fax activity check box to start logging outgoing faxes.

Optional, you may also want to set the archiving limits and set your rules for the length of the logging.

Second, use the following script: I then modified a powershell script I found: The script imports the Tab Delimited fax text file and creates a csv file. And sorts the contents by the "Submission Date" and the "Status"/"Transmission Error". It will then export the csv file as a html file which is then copied to a IIS web server for users to view. I run a scheduled task once an hour.

Note: The TabDelimited file contained 50 columns, but Powershell had a problem exporting all 50 columns to html. 50 is the max limit, but I had to select just 49 columns for it to work correctly.

The following script is rough and could be improved but works fine for my purposes. Original powershell script can be found here.

# This script takes the outboxlog.txt file from the Windows Server fax service 
# and parses it to find faxes that did not complete. Results are dumped as a 
# Web page. Normally a user can view only the status of their own faxes. 
# This allows you to view failed faxes for any user. 

# This script can be run as a scheduled task to provide a constantly updated list 
# Required command line in scheduled task is: 
# powershell.exe "& 'C:\ProgramData\Microsoft\Windows NT\MSFax\ActivityLog\ParseOutbox.ps1'" 

# Created by Byron Wright, byron@conexion.ca 

# Define the file locations used. 
$Source="C:\ProgramData\Microsoft\Windows NT\MSFax\ActivityLog\outboxLog.txt" 
$TempSource="C:\ProgramData\Microsoft\Windows NT\MSFax\ActivityLog\outboxlogtemp.txt" 
$CsvDestination="C:\ProgramData\Microsoft\Windows NT\MSFax\ActivityLog\outboxlog.csv" 
$HTMLDestination="C:\inetpub\wwwroot\FailedFaxes.htm" 

# Import-TabDelimited function taken from The PowerShell Guy 
# Source located at http://thepowershellguy.com/blogs/posh/archive/2007/03/31/powershell-examples-used-on-ars-technica.aspx 

function Import-TabDelimited ($Path) { 
  gc $path |% {$header = $true}  { 
    if ($header){ 
      $h = $_.split("`t") 
      $header = $false 
    } 
    Else { 
      $r = new-object object 
      $_.split("`t") |% {$i=0}{ 
        $r | add-Member -memberType noteProperty -name $h[$i] -value $_ 
        $i++ 
      } 
      $r  
    } 
  } 
} 


#Processing the text file may lock it and cause problems on a busy fax server 
#So, copy it quick.  
Copy-Item -Path $Source -Destination $TempSource  

#Convert to Outboxlog.txt to a csv file 
Import-TabDelimited -Path $TempSource | Export-csv -Path $CsvDestination -NoTypeInformation 

#Get a list of faxes that failed by looking at the Status column 
#Note that the column name includes double quote. Single quotes used to allow that. 
$BadFaxes=import-csv -Path $CsvDestination | where {$_.'"Status"' -eq '"Transmission Error"'} | Sort-Object {[datetime] $_.'"SubmissionTime"'} -descending 

#Dump bad faxes to an HTML file. The Select-Object cmdlet is selecting the columns to include. 
#Again note that double quotes are part of the column name. 
# "JobID"   "ParentJobID"   "SubmissionTime"    "Scheduled" "Status"    "ErrorDesc" "ErrorCode" "StartTime" "EndTime"   
# "Device"  "DialedNumber"  "CSID"  "TSID"  "Pages" "TotalPages"    "QueueFileName" "Document"  "FileSize"  "Retries"   
# "ServerCoverPage" "CoverPageSubject"  "CoverPageNote" "UserName"  "SenderName"    "SenderFaxNumber"   
# "SenderCompany"   "SenderStreet"  "SenderCity"    "SenderZipCode" "SenderCountry/Region"  "SenderTitle"   
# "SenderDepartment"    "SenderOffice"  "SenderHomePhone"   "SenderOfficePhone" "SenderEMail"   "RecipientName" 
# "RecipientFaxNumber"  "RecipientCompany"  "RecipientStreet"   "RecipientCity" "RecipientZipCode"  "RecipientCountry/Region"   
# "RecipientTitle"  "RecipientDepartment"   "RecipientOffice"   "RecipientHomePhone"    "RecipientOfficePhone"  
# "RecipientEMail"  "BillingCode"


$Header = @"
<style>
TABLE {border-width: 1px;border-style: solid;border-color: black;border-collapse: collapse;}
TH {border-width: 1px;padding: 3px;border-style: solid;border-color: black;background-color: #6495ED;}
TD {border-width: 1px;padding: 3px;border-style: solid;border-color: black;}
</style>
"@
$Pre = "<H1>Failed Faxes: $(Get-Date -format 'g')</H1>"
$Post = "<H3>$(Get-Date -format 'g')</H3>"

$BadFaxes | Select-Object '"SubmissionTime"','"RecipientName"','"RecipientFaxNumber"','"CoverPageSubject"','"Retries"','"ErrorDesc"' | ConvertTo-HTML -Body $Header -PreContent $Pre -PostContent $Post | Out-File -FilePath $HTMLDestination