Web Reports save to a folder

Hello All,

BigFix Web Reports does not natively support saving scheduled reports to a folder. It only supports email delivery for scheduled reports.

Can someone please advise how to save them to a folder ?

I get to know about these 2 options, but need more details to apply them.

Option 1: Use Web Reports REST API

  1. Enable Web Reports API on your BigFix server.

  2. Write a script (PowerShell, Python, etc.) that:

    • Authenticates with Web Reports API.

    • Runs the desired report.

    • Retrieves output in CSV/HTML/XML format.

    • Saves the file to a designated folder (e.g., C:\Reports\DailyReport.csv).

  3. Schedule the script using:

    • Windows Task Scheduler (Windows).

    • Cron (Linux).

  4. Reference: Web Reports API Guide


Option 2: Scheduled Script on Web Reports Server

  • Similar to Option 1, but the script runs locally on the Web Reports server.

  • Steps:

    1. Create script → Login → Execute report → Save output.

    2. Schedule via Task Scheduler.

Follow this link to set up a scheduled report

In the «Activity Actions» section you can «Archive» the report.

The reports will be found in a folder on the server

/Geir

1 Like

Here's another idea:

There are a few options, but whichever one you use I would recommend using something like Keepass or a different credential vault to prevent plain text credentials from being saved directly within scripts.

  1. Powershell - If you want to build the Report in webreports you can use Powershell as an invoke-webrequest. The url listed as insertURLhere can be retrieved by going into the F12 debug tools in the browser and click the export to csv button.

Import-module PoshKeePass
$KPUser = Get-KeePassEntry -Title Automation -DatabaseProfileName Automation -AsPlainText
$data = @{"page" ="loggingIn"; "fwdpage:"=""; "Username"=$($KPUser.UserName); "Password"=$($KPUser.Password)}
$uri = "insertURLhere"
$Response = Invoke-WebRequest -Uri $uri -body $data -ContentType "application/csv"
$Response.RawContent | Out-File .\DCRawData.txt -Force
$Header = 'ComputerName','Sentinel','OS','Domain','ADPath','LastReportTime'
$DCRawData = (Get-Content .\DCRawData.txt | Select-Object -Skip 8) | ConvertFrom-CSV -Header $Header
$DCs = $DCRawData | Select-Object ComputerName,Domain

  1. BFExtractToCSV - BFExtractToCSV - BigFix Wiki Wiki

    Clear-Host
    Import-Module ActiveDirectory
    if ($PSVersionTable.PSVersion.Major -eq 7)
    {
    Import-Module PoShKeePass -UseWindowsPowerShell -WarningAction SilentlyContinue | Out-Null
    }
    if ($PSVersionTable.PSVersion.Major -eq 5)
    {
    Import-module PoshKeePass
    }
    Import-Module ActiveDirectory
    $ADSyncServer = "Enter domain controller FQDN"
    $EmpInfo = Read-Host "Enter Employee ID or LoginID"

    If($EmpInfo -match "^\d{6}$")
    {
    #We have an employee ID
    $EmpID = $EmpInfo
    #Now find the user ID
    $UserADInfo = Get-ADUser -Filter "employeeID -eq '$EmpID'" -Properties samAccountName, displayName, givenName,sn -Server $ADSyncServer | Where-Object { $.samAccountName.Length -eq 7 -and ($.UserPrincipalName -match "domain.com")} |
    Select-Object samAccountName, displayName,givenName,SN
    [string]$UserID = $UserADInfo.samAccountName
    $UserID = $UserID.ToLower()
    }
    else
    {
    $UserID = $EmpInfo.ToLower() <# Action when all if and elseif conditions are false #>
    }
    $UserID

    $CredName = "BigFixSAMLQueries"
    $KPUser = Get-KeePassEntry -Title $CredName -DatabaseProfileName Automation -AsPlainText

    $sourceFile = ".\yamlTemplate.txt"
    $destinationFile = ".\queriesConfig.yaml"
    $content = Get-Content $sourceFile -Raw
    $content = $content -replace "##UserID##", $UserID
    $content | Set-Content -Path $destinationFile

    & ".\BFExtractToCSV.exe" -u automation -p $KPUser.password -webReports "https://webreportsserverurl" -customQuery "LastUserDetails"
    Get-Content .\LastUserDetails.csv | Select-Object -Skip 1 | Out-File .LastUserDetails.csv -Force
    $Data = Import-CSV .\LastUserDetails.csv
    $Data | Format-Table -AutoSize
    $Computer = $Data.'Computer Name'
    $Serial = $Data.'Serial Number'
    $Model = $Data.Model
    $Manufacturer = $Data.Manufacturer
    Write-OutPut "Computer: $Computer"
    Write-OutPut "SN: $Serial"
    Write-OutPut "Model: $Model"
    Write-OutPut "Manufacturer: $Manufacturer"
    Remove-Item .\LastUserDetails.csv -Force

  2. RestAPI Query - if you have query permissions with restapi then you can use the Excel connector to build out your report, open the session relevance editor and grab the session relevance and then use that session relevance to pass a relevance query to restapi to get the data exported to the format you prefer. This method works well if you have BigFix Explorer setup and you can export directly to json format if you prefer working with json directly from an API.