In the previous tip we explained how you can get PowerShellGet up and running with your PowerShell version. Now let’s see how easily the PowerShell Gallery can extend the PowerShell functionality.
To create a QR code for WiFi access, you just need a few lines of code now:
# adjust this to match your own WiFi $wifi = "myAccessPoint" $pwd = "topSecret12" # QR Code will be saved here $path = "$home\Desktop\wifiaccess.png" # install the module from the gallery (only required once) Install-Module QRCodeGenerator -Scope CurrentUser -Force # create QR code New-QRCodeWifiAccess -SSID $wifi -Password $pwd -OutPath $path # open QR code image with an associated program Invoke-Item -Path $path
This code will first download and install the free QRCodeGenerator module, then generate a magic QR code with the Wifi information you provided (make sure you adjust the information to match your Wifi).
The PNG picture generated can then be scanned with the camera app of most modern smart devices to connect them with the Wifi.
Just print out the QR code a couple of times, and next time you welcome guests, just hand them one of the print outs so they can easily join your WiFi.