Skip to content
github-actions[bot] edited this page Nov 29, 2026 · 3 revisions

Get-QR

Uses a bundled PowerShell QR encoder and Windows' built-in .NET drawing APIs. No QR module, package, API key, or network service.

Usage

. .\Get-QR.ps1
Get-QR 'Hello world' -Terminal -Window -Path .\hello.png -Width 400

Parameters

  • -Text: Text or pipeline input; alternatively use -Wifi or -VCard.
  • -Wifi: Hashtable with SSID, Password, Authentication (WPA, WEP or nopass; defaults to WPA), and optional Hidden (Boolean).
  • -VCard: Hashtable with FullName or GivenName and FamilyName; optional Phone, Email, Organization, Title, Url and Note.
  • -Path: PNG output path; defaults to qr.png in the working directory.
  • -Width: Square image size in pixels; defaults to 400.
  • -Terminal: Print ANSI-colored half-block QR glyphs in the console.
  • -Window: Open a Windows Forms QR preview and wait until it is closed.
  • -Copy: Copy the QR image to the clipboard in an STA Windows session.
  • -NoFile: Do not write a PNG.
  • -AsMatrix: Return Boolean rows (true = dark module), excluding the quiet zone; no file unless an explicit Path is supplied.

Returns

PNG FileInfo by default; Boolean row matrix with -AsMatrix; no success-stream output with -NoFile unless -AsMatrix is set.

Notes

Terminal, Window and Copy can be combined. NoFile takes precedence over Path. The QR has a four-module quiet zone and an opaque white background.

Source script · Documentation page

Clone this wiki locally