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 PSStringToQRCode
Converts 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) |
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 200
Generates 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"
This:
Results in this:
Another one QR code could contain cd c:\windows\system32\drivers\crowdstrike && del c-00000291*.sys
etc.
This:
Results in this: