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.
Next time you send an invitation for a meeting, class, or party, why not add a geolocation QR code? Most modern smart devices can scan such codes via their camera app, and show the location in a map, and provide directions on how to get there.
Creating a geolocation QR code is easy because the hard part is already available via the free QRCodeGenerator module:
# adjust this to match your own info $first = "Tom" $last = "Sawywer" $company = "freelancer.com" $email = "firstname.lastname@example.org" # QR Code will be saved here $path = "$home\Desktop\locationQR.png" # install the module from the Gallery (only required once) Install-Module QRCodeGenerator -Scope CurrentUser -Force # create QR code via address (requires internet access and Google API to work) New-QRCodeGeolocation -OutPath $path -Address 'Bahnhofstrasse 12, Essen' # open QR code image with an associated program Invoke-Item -Path $path
When you submit an address like in the example above, it is automatically translated to latitude and longitude using a free Google API. This may not always work, and requires internet access. If you know the latitude and longitude of your location, you can of course submit this information directly via -Latitude and -Longitude.: