How to view the images a user has viewed using Smoothwall reports and Powershell

How to view the images a user has viewed using Smoothwall reports and Powershell

Reporting is a key part of any IT position and nowhere is this more apparent than when it comes to web filtering. Being able to block or filter users requests is one thing, but reporting on who was blocked, and why, is every bit as important.

This is why thismorning I was asked to report on images being viewed by certain users. There was a concern about the content of the images but not the site. The files were hosted on legitimate, un-blocked, websites but there was a worry that the images themselves might be counter to some of the policies and agreements we have in place internally.

This was a difficult one to report on. Though our smoothwall gives you a decent number of reporting options, none of them currently show the images themselves, just the URLs of the images.

So I created the following powershell script. This will go through the output of the “Complete user audit trail” report from a Smoothwall and download any pictures mentioned there in to a folder with the same name as the report. Then you can easily scroll through the images and look for the ones you need.


  1. Run your “Complete user audit trail” by logging on to your Smoothwalls web console and clicking on Logs and Reports > Reports > User Reports > Complete User Audit Trail. Enter the Username and click Run Report.2016-03-07 - Reports
  2. Save the report as a CSV file by clicking CSV in the top right corner of the report screen.
    2016-03-07 - Reports
  3. Rename the CSV file after the user so that it’s easy to find.
  4. Copy the Powershell script below in to a file in the same directory and call it “Smoothwallquery.ps1”.
  5. Run the following command line. The only parameter is -file which points to the csv file you just saved.
    smoothwallquery.ps1 -file test.user.csv
  6. You should now get a folder named after the user with the images that were visited during that report period.2016-03-07 13_55_01-test.user

The powershell script

Here’s the powershell script. If you have any questions feel free to use the comment section.


Oliver Marshall
Oliver works as Head of Sales at a leading provider of IT services to the education sector. Out of hours he's a runner with a limp, has a board game addiction and a owns a dog that looks like a badger.
Show Buttons
Hide Buttons

Before you go...

Subscribe to my newsletter

If you enjoyed this article then why not let me know.