Skip to content

About

PowerBGInfo is a PowerShell module that is used to generate background information for Windows machines. It's a replacement for BGInfo that doesn't require installation and is much more flexible.

Topics

Resources

Stars

325 stars

Watchers

9 watching

Forks

Repository files navigation

Website: powerbginfo.com.

Discord

PowerBGInfo

PowerBGInfo turns PowerShell data into desktop backgrounds on Windows, macOS, GNOME, and KDE Plasma, and lock screen backgrounds on Windows. Put the machine's identity, the signed-in user, support details, health and status, charts, diagrams and QR codes straight on the wallpaper, for every monitor, and refresh it at every sign-in. It is a PowerShell alternative to Sysinternals BGInfo: the layout is a script, the data can come from anywhere, and nothing but the module is installed.

A server status wallpaper rendered by PowerBGInfo

  • Your data, time-boxed. Built-in system facts, plus any value from CIM, the registry, Active Directory, a REST API or a monitoring export. A slow or broken source falls back to a default instead of blocking sign-in.
  • One look, any screen. Six themes in light and dark, layout regions that keep the taskbar and desktop icons clear, and one image per monitor at its own size and scale.
  • More than text. Metric cards, tables, lists, calendar heatmaps, timelines, treemaps, Mermaid diagrams, QR codes, ChartForgeX charts and topology maps, coloured by warning and critical thresholds.
  • Built for fleets. Render to a file, the current user, every profile or the lock screen, and run it from Task Scheduler, Group Policy, Intune, Configuration Manager or Remote Desktop session hosts.

You can read about the project's backstory in this blog post.

Installation

Install from the PowerShell Gallery:

Install-Module -Name PowerBGInfo -Scope CurrentUser

PowerBGInfo runs in Windows PowerShell 5.1 on Windows and PowerShell 7.4 or later on Windows, macOS, and Linux. File rendering works without a graphical session. Use Get-BGInfoCapability to inspect the desktop backend before applying a wallpaper; per-display images and automatic sizing depend on that backend. See the cross-platform guide for the support boundaries and portable example. When using the current wallpaper as the base, PowerBGInfo preserves its reported fit unless you supply -WallpaperFit. Unreadable or unsupported source images stop the run before desktop application. Choose -FilePath or an explicit New-BGInfoBackground to select another base. The rendering and desktop libraries ship inside the module, so nothing else needs installing. Releases are Authenticode-signed by Evotec. Run Update-Module -Name PowerBGInfo to update an existing installation.

Quick start

Collect the data first, then draw it. This renders a file and leaves the desktop alone:

$facts = Get-BGInfoSystemInfo

$render = @{
    Theme                  = 'Graphite'
    Target                 = 'File'
    ConfigurationDirectory = "$env:TEMP\PowerBGInfo"
    OutputFileName         = 'wallpaper.png'
}
New-BGInfo @render {
    New-BGInfoBackground
    New-BGInfoLabel -Name $facts.ComputerName -FontSize 56
    New-BGInfoValue -Name 'User' -Value $facts.LoggedOnUser
    New-BGInfoValue -Name 'Windows' -Value $facts.OSName
    New-BGInfoValue -Name 'Uptime' -Value $facts.UptimeText
    New-BGInfoValue -Name 'IP address' -Value $facts.IPv4Address
    $facts.Disks | New-BGInfoTable -Region Right -Title 'Disks' `
        -Property Drive, FreeGB, UsedPercent
}

New-BGInfo returns the path of the image. Open it, adjust the layout, and when it looks right drop Target = 'File': the default target, Wallpaper, applies it to the signed-in user's desktop. Examples/Run.BGInfo.Template.ps1 is a copy-and-fill starting point with your own data function.

Run it in production

PowerBGInfo renders and applies once per run; schedule it to keep the values current. The deployment guides cover the whole route, with a tested reference script:

Guide Covers
Run in production What one run does, choosing a route, installing the module for all users, the reference script
Task Scheduler Logon, unlock and timed refresh for every user; machine images as SYSTEM
Group Policy Startup install, Preferences scheduled task, logon scripts, wallpaper and lock screen policies
Microsoft Intune Win32 app, platform scripts, Remediations, Personalization CSP
Configuration Manager Applications, packages and Run Scripts
Remote Desktop and Azure Virtual Desktop Session hosts, AVD multi-session and personal, Windows 365
Security and operations Rights, signing and AllSigned, App Control, logging
Troubleshooting Reverting, black, stretched or blurry wallpapers, BGInfo migration, the lock screen

The guides' source is in Website/content/project-docs/docs.

Themes

-Theme gives text, panels, charts, diagrams, tiles, widgets and the backdrop one look. Every PowerBGInfo cmdlet inside the script block uses the theme for the parameters you leave out; parameters you set win.

New-BGInfo -Theme Aurora -ThemeMode Light -Target File `
    -ConfigurationDirectory "$env:TEMP\PowerBGInfo" `
    -OutputFileName 'themed.png' {
    New-BGInfoBackground -Width 1920 -Height 1080
    New-BGInfoLabel -Name 'SQL-PROD-01' -FontSize 64
    New-BGInfoLabel -Name 'PRODUCTION' -Accent
    New-BGInfoValue -Name 'Owner' -Value 'Data Platform'
    New-BGInfoChart -Region Right -Title 'CPU' -Kind Area `
        -Values 12, 30, 22 -NoHistory
}

Presets: Graphite, Midnight, Aurora, Ember, Orchid and Corporate, each light and dark. New-BGInfoTheme customizes one with -Accent, -SecondaryAccent, -Surface, -CornerRadius, -FontFamilyName and -Scale for high-DPI screens.

Theme presets, dark and light

New-BGInfoBackground paints the backdrop: a base colour, an optional image (-ImagePath), a gradient, glows and a dot or grid pattern. Without -Width and -Height it renders at the size of the target monitor.

Layout regions

Panels flow into named regions instead of hand-placed coordinates, so one script fits 1920x1080, 2560x1440, ultrawide and portrait screens.

Region Behaviour
Top, Bottom Full-width bands. Panels flow left to right; unsized panels share the width, and a row of fixed widths is centered. If fixed panels and their gaps do not fit, their widths shrink proportionally to stay inside the band.
Left, Right Columns between the bands. Panels stack top to bottom; unsized panels share the height, up to 36 % of the screen each.
Center The space between the columns, stacked and centred.
New-BGInfo -Theme Graphite -Target File `
    -ConfigurationDirectory "$env:TEMP\PowerBGInfo" `
    -OutputFileName 'regions.png' {
    New-BGInfoLayout -IconAreaWidth 96 -ColumnWidth 480
    New-BGInfoValue -Name 'Host' -Value $env:COMPUTERNAME
    New-BGInfoChart -Region Right -Title 'CPU' -Kind Area `
        -Values 12, 30, 22 -NoHistory
    New-BGInfoMetric -Region Right -Label 'Memory' -Value 71 -Unit '%'
    New-BGInfoChart -Region Bottom -Title 'Network' -Kind Line `
        -Values 120, 180, 160 -NoHistory
}

The safe area keeps the taskbar free and, with -IconAreaWidth, the desktop icons. Items without -Region keep -Anchor, -OffsetX, -OffsetY, -PositionX and -PositionY.

Regions on an ultrawide screen

Widgets

Each widget shares panel, header (-Title, -Note), placement and theme options. -Scale enlarges content inside the same panel. Over-capacity tables and lists retain their rows through bounded native batches. Text can become very small; use fewer rows or a larger panel when readers need individual values.

Cmdlet Shows
New-BGInfoMetric One KPI with trend, caption, history and status
New-BGInfoTable Rows and columns from piped objects, with status dots
New-BGInfoList Bullets, numbers, a checklist or status rows
New-BGInfoCalendarHeatmap One cell per day
New-BGInfoTimeline Ranges on lanes with a Now marker
New-BGInfoTreemap Sizes as nested rectangles, optionally colored by a second measure (-ColorProperty)
New-BGInfoMermaid A diagram from Mermaid text, rendered without a browser
New-BGInfoQRCode A scannable link, for example to open a ticket
$flow = @'
flowchart LR
  A[Service desk] --> B[On call] --> C[Major incident]
'@
$help = 'https://help.contoso.com/new?asset=CT-04217'

New-BGInfo -Theme Midnight -Target File `
    -ConfigurationDirectory "$env:TEMP\PowerBGInfo" `
    -OutputFileName 'widgets.png' {
    New-BGInfoBackground
    New-BGInfoLabel -Name $env:COMPUTERNAME -FontSize 56
    Get-Process | Sort-Object -Property CPU -Descending |
        Select-Object -First 5 |
        New-BGInfoTable -Region Right -Title 'Top processes' `
            -Property Name, Id
    New-BGInfoQRCode -Region Right -Url $help -Title 'Scan for help' `
        -Caption 'help.contoso.com'
    New-BGInfoMermaid -Region Bottom -Title 'Escalation' -Definition $flow
}

QR codes are encoded by CodeGlyphX; Mermaid diagrams are parsed and drawn by ChartForgeX.Mermaid. Gauges and radials stay New-BGInfoChart -Kind Gauge, Circle or RadialBar.

Metric cards Tables
Calendar heatmap Timeline
Mermaid QR code

Status thresholds

-WarningThreshold, -CriticalThreshold and -ThresholdDirection Above|Below choose ok, warning or critical colours from the value, so scripts no longer pick colours by hand. Bar, progress, bullet and pictorial charts colour each row; gauges, circles and lines take the colour of the latest value; New-BGInfoMetric and New-BGInfoVisualCanvasTile -StatusValue set their status.

$volumes = @{
    Title             = 'Volumes used'
    Kind              = 'ProgressBar'
    Values            = 61, 88, 96
    Labels            = 'C:', 'D:', 'L:'
    Maximum           = 100
    ValueSuffix       = ' %'
    WarningThreshold  = 80
    CriticalThreshold = 90
}
$memory = @{
    Label              = 'Free memory'
    Value              = 9
    Unit               = '%'
    WarningThreshold   = 15
    CriticalThreshold  = 5
    ThresholdDirection = 'Below'
}
New-BGInfo -Theme Graphite -Target File `
    -ConfigurationDirectory "$env:TEMP\PowerBGInfo" `
    -OutputFileName 'thresholds.png' {
    New-BGInfoBackground
    New-BGInfoChart -Region Bottom @volumes -NoHistory
    New-BGInfoMetric -Region Right @memory
}

Your data, then the wallpaper

Collecting the data is usually the hard part, so keep it apart from the layout. Every example starts with a data function that returns plain values, and the New-BGInfo block only reads them.

function Get-MyWallpaperData {
    # your logic: CIM, registry, Active Directory, a REST API...
    @{ Owner = 'Finance IT'; DiskUsed = 63; Cpu = 12, 18, 25 }
}

$source = @{
    Name           = 'Wallpaper data'
    TimeoutSeconds = 15
    ScriptBlock    = ${function:Get-MyWallpaperData}
    Default        = @{ Owner = 'unknown'; DiskUsed = 0; Cpu = @(0) }
}
$data = Invoke-BGInfoDataSource @source

New-BGInfo -Theme Graphite -Target File `
    -ConfigurationDirectory "$env:TEMP\PowerBGInfo" `
    -OutputFileName 'data.png' {
    New-BGInfoBackground
    New-BGInfoLabel -Name $data.Owner -FontSize 56
    New-BGInfoMetric -Region Right -Label 'System drive' `
        -Value $data.DiskUsed -Unit '%' -WarningThreshold 80
    New-BGInfoChart -Region Right -Title 'CPU' -Kind Area `
        -Values $data.Cpu -NoHistory
}
  • Invoke-BGInfoDataSource runs the script block in its own runspace. Errors, empty output and timeouts produce a warning and -Default. Pass caller variables with -ArgumentList. Waiting for capacity and cancellation share the caller's time budget; a started provider retains capacity until cleanup finishes.
  • Get-BGInfoSystemInfo returns machine, account and signed-in session user, domain, OS, boot time, uptime, IPv4, disks, update, Defender and BitLocker facts as plain data. Unavailable probes leave fields unknown. WMI probes use a five-second caller limit; after a stalled worker's deadline, later probes return unknown until it finishes. A later snapshot retries unavailable facts. Wrap the snapshot in Invoke-BGInfoDataSource to bound the whole call.
  • Get-BGInfoMonitor returns the indexes -MonitorIndex takes, monitor bounds, primary flag and display scale. Loop over it to render one image per monitor; Examples/Run.BGInfo.PerMonitor.ps1 shows how.

Built-in tokens such as LoggedOnUser, OSName and Uptime remain portable in saved configuration and resolve during rendering. Use the snapshot command for immediate values. LoggedOnUser refers to this process's signed-in session; in session 0 it uses the active console user.

Showcase

Twenty-two wallpapers, each built for one job and one question from the person at that screen. They share the theme presets and start with a data block: replace the sample function with your own source and the layout keeps working. Every scenario renders in light and dark at any resolution and writes a file without touching the desktop.

Scenario What it answers Script
Server status Is this server healthy? Uptime, disks, services, network. Examples/Run.BGInfo.ServerStatus.ps1
Help desk How do I get help, and what do I tell them? Examples/Run.BGInfo.HelpDesk.ps1
Lab or classroom Which seat is this, and when does it reset? Examples/Run.BGInfo.Classroom.ps1
Admin workstation Is this privileged machine healthy, and where may it connect? Examples/Run.BGInfo.AdminWorkstation.ps1
Domain controller Is the directory replicating, who holds the roles, is the clock right? Examples/Run.BGInfo.DomainController.ps1
Hyper-V host Is there room for another VM, and which VMs use this host? Examples/Run.BGInfo.HyperVHost.ps1
NOC and on call Who is on call now, and how does an incident escalate? Examples/Run.BGInfo.OnCall.ps1
Branch office PC Where am I, is the link up, and how do I get help? Examples/Run.BGInfo.BranchOffice.ps1
Meeting room Which room is this, is it free, and how do I share my screen? Examples/Run.BGInfo.MeetingRoom.ps1
Build agent Is this agent busy or broken, and is there disk left? Examples/Run.BGInfo.BuildAgent.ps1
Patch day When does this PC restart, and is the rollout on track? Examples/Run.BGInfo.PatchDay.ps1
Kiosk or signage One message from across the room, and a code for the details. Examples/Run.BGInfo.Signage.ps1
Production or test Which environment is this, and what may I change here? Examples/Run.BGInfo.EnvironmentMarker.ps1
RDS session host Is the broker still sending users here, and who is on it? Examples/Run.BGInfo.RdsSessionHost.ps1
SQL Server Does every database have a recent backup and a current replica? Examples/Run.BGInfo.SqlServer.ps1
File server Which shares are close to their quota, and when does the fullest run out? Examples/Run.BGInfo.FileServer.ps1
Server being retired How long has this server got, and where do I work instead? Examples/Run.BGInfo.DecommissionNotice.ps1
Change freeze May I change this now, until when, and who approves an exception? Examples/Run.BGInfo.ChangeFreeze.ps1
Certificate authority What expires soon, and are the CRL and AIA/CDP paths healthy? Examples/Run.BGInfo.CertificateAuthority.ps1
Backup server Did last night's backups work, and what needs a retry before tonight? Examples/Run.BGInfo.BackupServer.ps1
Jump host Who is elevated, what is recorded, and what is never allowed here? Examples/Run.BGInfo.JumpHost.ps1
Linux server What is this Linux box, rendered headless under PowerShell 7? Examples/Run.BGInfo.LinuxServer.ps1
Hyper-V host: a treemap of VM memory colored by CPU Domain controller: replication, FSMO roles and failed sign-ins
Patch day: restart countdown and update rings Meeting room: today's bookings and guest Wi-Fi

NOC and on call on an ultrawide wall display

Light and dark renders of every scenario are in Examples/Showcase/Images.

.\Examples\Run.BGInfo.HyperVHost.ps1 -Theme Light -Width 2560 -Height 1440
.\Examples\Run.BGInfo.Showcase.ps1 -OutputDirectory "$env:TEMP\Showcase"
.\Examples\Run.BGInfo.Showcase.ps1 -Scenario on-call, signage -Size 1920x1080

Examples/Features has one script per feature, and Examples/Run.BGInfo.Features.ps1 renders them all.

Charts, topology and visual canvases

New-BGInfoChart draws ChartForgeX charts as transparent overlays: Sparkline, Line, Area, Bar, HorizontalBar, Gauge, Circle, RadialBar, Bullet, Pie, Donut, ProgressBar and Pictorial. Charts keep their history between runs in <ConfigurationDirectory>\Charts, keyed by -Id, so a scheduled task builds a rolling trend; -Metric CpuPercent, MemoryPercent and DiskFreePercent sample the machine for you.

New-BGInfo -Target File -ConfigurationDirectory "$env:TEMP\PowerBGInfo" `
    -OutputFileName 'charts.png' -BackgroundColor Black {
    New-BGInfoValue -BuiltinValue HostName -Color White
    New-BGInfoChart -Id 'cpu' -Title 'CPU' -Metric CpuPercent `
        -ValueSuffix '%' -Kind Sparkline -MaxPoints 60 -Anchor BottomLeft
}

New-BGInfoTopology places a compact service or network map, and New-BGInfoVisualCanvas with New-BGInfoVisualCanvasTile builds hero overlays with icon tiles, progress rails and mini charts. The scripts in Examples/Scripts show complete layouts:

Use -TextScale on a tile or -TileTextScale on the canvas to adjust tile text. New-BGInfoTheme -Scale sets the default. Unset tile dimensions grow with the text; explicit dimensions stay fixed and may trigger fit diagnostics. For individual roles, use -LabelFontSize, -ValueFontSize, or -DetailFontSize. See Examples/Run.BGInfo.TileText.ps1 for a file-only example.

Operational charts over a wallpaper

Colour parameters accept ChartForgeX colour names, design tokens such as Emerald400, and hex strings (#RGB, #RGBA, #RRGGBB, #RRGGBBAA). Labels, values and chart headers support font family, size, weight, italic, underline, strikethrough, baseline and casing.

JSON configurations

A layout can be exported to JSON, reviewed and versioned on its own, and rendered again later:

$outputDirectory = Join-Path ([IO.Path]::GetTempPath()) 'PowerBGInfo'
$json = Join-Path $outputDirectory 'layout.json'
New-BGInfo -Target File -ConfigurationDirectory $outputDirectory `
    -JsonPath $json -ExportOnly {
    New-BGInfoValue -BuiltinValue HostName -Name 'Machine'
    New-BGInfoValue -BuiltinValue LoggedOnUser -Name 'User'
}
Invoke-BGInfo -Path $json -NoApply

The JSON keeps built-in value tokens, chart metrics, themes, regions, widgets, layout and target settings. It does not keep PowerShell code: a foreach or a data function runs once at export and its results are stored as fixed values. Sample files are in Examples/Configuration.

The NativeAOT CLI resolves CpuName and RAMSize through Windows when WMI is unavailable. In that case, RAMSize reports total installed memory; per-module memory sizes, speed and part numbers still require WMI. Other WMI-backed facts and live CPU/memory percentages may remain unavailable in NativeAOT.

Known issues

The VS Code PowerShell extension has a known problem with the module in Windows PowerShell 5.1. The regular Windows PowerShell 5.1 console, Windows PowerShell ISE and PowerShell 7.4 or later work.

Development and validation

Build and test the current checkout:

dotnet test ./Sources/PowerBGInfo.sln
./PowerBGInfo.Tests.ps1

For a fuller pass, the validation script builds the solution and runs the .NET and Pester tests and the JSON rendering checks; add -KeepArtifacts to keep the rendered files:

./Build/Validate-PowerBGInfo.ps1 -Configuration Release

For a NativeAOT CLI export, select the portable target and the CLI's publish profile. Set the runtime to the build host; this example uses Apple Silicon:

dotnet publish ./Sources/PowerBGInfo.Cli/PowerBGInfo.Cli.csproj -c Release `
    -f net8.0 -r osx-arm64 -p:PublishProfile=NativeAot

The profile enables AOT for the executable without applying AOT publish settings to the net472 dependency builds.

About

PowerBGInfo is a PowerShell module that is used to generate background information for Windows machines. It's a replacement for BGInfo that doesn't require installation and is much more flexible.

Topics

Resources

Stars

325 stars

Watchers

9 watching

Forks

Releases

Sponsor this project

Used by

Contributors

Languages