Earlier this year I was lucky to attend the PowerShell Conference Europe [a.k.a. PSConfEU], which is easily the geek highlight of my year.
At the Opening ceremony, organizer and PowerShell GURU Dr. Tobias Weltner showed this gem that amazed me in it’s simplicity
I present you: the QRCodeGenerator
As the name implies, the QRCodeGenerator will generate various QR codes for you to use, all through the magic of PowerShell [and of course the QR generator solution in C# which this module uses].
Of course now we’ll want to play with it, so let’s get the module!
Let’s just assume by now you’ll have at least [Windows] PowerShell 5+, if you don’t, please get it ASAP [or get PowerShell Core instead]!
1 |
Find-Module -Name QRCodeGenerator |
When searching the PowerShellGallery, you should be presented by the last version
Go ahead and install this module for yourself
1 |
Find-Module -Name QRCodeGenerator | Install-Module -Scope CurrentUser |
or for everyone on your system [be sure to run PowerShell as Administrator]
1 |
Find-Module -Name QRCodeGenerator | Install-Module -Scope AllUsers |
Ok, so now what?
Let’s see what options we have available
1 |
Get-Command -Module QRCodeGenerator |
So we can create a new
- GeoLocation QR Code
- vCard QR Code
- Wifi Access QR Code
As expected, each of the provided cmdlets come with properly created help files, examples and all 3 cmdlets have similar input parameters, mainly
- Width – height and width of the generated code [default is 100]
- Show – open the generated code in default program
- OutPath – path to generated png file. If left empty, a temporary file name will be used.
Practical applications
To be honest, the 2 main reasons I liked this are the Wifi Access and vCard codes.
While there might be some use for the GeoLocation one, I would think it’d mainly be in like print media, to display your company’s location information or such.
The New-QRCodeWifiAccess cmdlet can be used at home or at work provide access to your guest wifi network.
Simply generate the code, print and laminate it once and whenever people ask for access, just let them scan the code!
1 |
New-QRCodeWifiAccess -SSID Contoso-guest -Password '#InsertRandomKeyPhraseForGuestsHere' -Show |
And tada!
As for the New-QRCodevCard cmdlet, it works just the same. In this case I would recommend using it on your business card to allow your contact to easily add you in her/her phone.
1 |
New-QRCodeVCard -FirstName Foo -LastName Bar -Company FUBAR -Email mailme@fubar.org -Show |
All in all, I thought this was thing to share, I hope you think so too!
Happy Scripting! 🙂




The “New-QRCodeVCard” seems to be working rather well.
Since it is a contact card, how does one insert their phone number into the QR code?
Hey Jon,
At the moment the QRCodeGenerator module doesn’t allow the adding of these properties, but you could post a request for dr. Tobias Weltner through the PowerShell Gallery option ‘Contact owners’ [or perhaps on Twitter] to add this, as the QR code generator used to power this does allow this property:
https://github.com/codebude/QRCoder/wiki/Advanced-usage—Payload-generators#35-contactdata-mecardvcard