PowerShell-module for converting text strings to QR-code and display it on screen, or save it as a .PNG-image.
- Net.Codecrete.QrCodeGenerator by Manuel Bl. (https://github.com/manuelbl/QrCodeGenerator)
- SkiaSharp by Mono Project (https://github.com/mono/SkiaSharp)
- Svg.Skia by Wiesław Šoltés (https://github.com/wieslawsoltes/Svg.Skia)
All credits to the respectfull creators of the assemly-code used. I simply pieced it together, so that it will perform a very specific task in PowerShell :)
Install-Module -Name PSStringToQRCodeConverts text strings to QR-code and display it on screen.
| Parameter | Description |
|---|---|
| text (mandatory) | The input text (string) |
| height | Height in px(int) |
| width | Width in px(int) |
| SaveImageOutput | Outputs PNG-file to specified path. Path must contain filename .png-extension (string) |
| StreamOutput | Outputs a data stream containing the PNG-image. Pipe another tool og cmdlet (switch) |
Generates a 200x200px QR-code and saves it as .png-image file.
"let's get schwifty" | Convert-StringToQR -SaveImageOutput c:\temp\swifty.png -height 200 -width 200Generates a QR-code and displays it on the screen
Convert-StringToQR -text "manage-bde –unlock c: -RecoveryPassword 002130-563959-533643-315590-484044-259380-247291-123563"Generates a QR-code and pipes it to a cmdlet that displays image in console
Convert-StringToQR 'Ninja Turtles' -height 250 -width 250 -StreamOutput | ConvertTo-SixelThis:
Results in this:
Another one QR code could contain cd c:\windows\system32\drivers\crowdstrike && del c-00000291*.sys etc.
This:
Results in this:



