Windows OS Hub
  • Windows Server
    • Windows Server 2022
    • Windows Server 2019
    • Windows Server 2016
    • Windows Server 2012 R2
    • Windows Server 2008 R2
    • SCCM
  • Active Directory
    • Active Directory Domain Services (AD DS)
    • Group Policies
  • Windows Clients
    • Windows 11
    • Windows 10
    • Windows 8
    • Windows 7
    • Windows XP
    • MS Office
    • Outlook
  • Virtualization
    • VMWare
    • Hyper-V
    • KVM
  • PowerShell
  • Exchange
  • Cloud
    • Azure
    • Microsoft 365
    • Office 365
  • Linux
    • CentOS
    • RHEL
    • Ubuntu
  • Home
  • About

Windows OS Hub

  • Windows Server
    • Windows Server 2022
    • Windows Server 2019
    • Windows Server 2016
    • Windows Server 2012 R2
    • Windows Server 2008 R2
    • SCCM
  • Active Directory
    • Active Directory Domain Services (AD DS)
    • Group Policies
  • Windows Clients
    • Windows 11
    • Windows 10
    • Windows 8
    • Windows 7
    • Windows XP
    • MS Office
    • Outlook
  • Virtualization
    • VMWare
    • Hyper-V
    • KVM
  • PowerShell
  • Exchange
  • Cloud
    • Azure
    • Microsoft 365
    • Office 365
  • Linux
    • CentOS
    • RHEL
    • Ubuntu

 Windows OS Hub / PowerShell / PowerShell: Generating QR Code for Wi-Fi Network in Windows 10

October 8, 2019 PowerShellWindows 10

PowerShell: Generating QR Code for Wi-Fi Network in Windows 10

You can use PowerShell to generate QR codes to share with your friends or colleagues. Let’s consider an example of using QRCodeGenerator PowerShell module to generate a  QR code image that can be used by your colleagues or guests to connect to your Wi-Fi network (as you don’t want to dictate your password to each friend 😉 ).

The QRCodeGenerator module may be used to generate PNG files with QR codes for the following object types:

  • vCard contact cards (business cards)
  • Geodata
  • Wi-Fi connection settings

You can download the QRCodeGenerator module manually (https://www.powershellgallery.com/packages/QRCodeGenerator/1.1) or using the following command:

Install-Module -Name QRCodeGenerator

After the module has been installed, open a new PowerShell window or import the module with this command:

Import-Module QRCodeGenerator

Change the PowerShell execution (running third-party scripts) policy :

Set-ExecutionPolicy Unrestricted -Scope Process

There are three PoSh cmdlets in this module: New-QRCodeGeolocation, New-QRCodeVCard and New-QRCodeWifiAccess.

To generate a QR code for a contact cards (vCard), use this script:

$strFirstName = "Max"
$strLastName = "Bakarlin"
$strCompany = "WOSHub"
$strEmail = "admin@woshub.com"
$strPath = "$home\desktop\Contact\vCard.png"
New-QRCodeVCard -FirstName $strFirstName -LastName $strLastName -Company $strCompany –Email $strEmail -OutPath $strPath

New-QRCodeVCard

To generate a QR code to access a Wi-Fi network, specify the SSID of your network and the connection password. For example:

$strSSID = "WiFiGuestNet"
$strWiFipassword = "3bg397-v232"
$strPath = "$home\desktop\Contact\wifi.png"
New-QRCodeWifiAccess -SSID $strSSID -Password $strWiFipassword -Width 10 -OutPath $strPath

New-QRCodeWifiAccess - generate from powershell

If you don’t remember the password of your Wi-Fi access point or mobile Hotspot in Windows 10, you can display the SSID and password for the specific profile of the saved wireless network using the following command:

netsh.exe wlan show profiles name='Profile Name' key=clear

Go to Contact folder on your desktop and make sure there are two PNG files containing QR codes.

png files witr qr codes

The feature of QR code recognition to connect a Wi-Fi network is integrated in iOS 11 and is available in many Android smartphones. For example, it works in my Xiaomi right out-of-the-box. Just scan this code using the camera, and your smartphone will automatically recognize that the QR code contains the Wi-Fi connection info and will suggest you to save them to connect to this Wi-Fi network (screenshots from Xiaomi running Android).

read qr code for wifi network from mobile device

0 comment
0
Facebook Twitter Google + Pinterest
previous post
SQL Server Install Error: Could Not Find the Database Engine Startup handle
next post
VMware ESXi: How to Kill an Unresponsive (Stuck) Virtual Machine

Related Reading

Configuring Event Viewer Log Size on Windows

May 24, 2023

How to Detect Who Changed the File/Folder NTFS...

May 24, 2023

How to Create, Change, and Remove Local Users...

May 17, 2023

Fix: BSOD Error 0x0000007B (INACCESSABLE_BOOT_DEVICE) on Windows

May 16, 2023

View Success and Failed Local Logon Attempts on...

May 2, 2023

Leave a Comment Cancel Reply

Categories

  • Active Directory
  • Group Policies
  • Exchange Server
  • Microsoft 365
  • Azure
  • Windows 11
  • Windows 10
  • Windows Server 2022
  • Windows Server 2019
  • Windows Server 2016
  • PowerShell
  • VMWare
  • Hyper-V
  • Linux
  • MS Office

Recent Posts

  • Configuring Event Viewer Log Size on Windows

    May 24, 2023
  • How to Detect Who Changed the File/Folder NTFS Permissions on Windows?

    May 24, 2023
  • Enable Single Sign-On (SSO) Authentication on RDS Windows Server

    May 23, 2023
  • Allow Non-admin Users RDP Access to Windows Server

    May 22, 2023
  • How to Create, Change, and Remove Local Users or Groups with PowerShell?

    May 17, 2023
  • Fix: BSOD Error 0x0000007B (INACCESSABLE_BOOT_DEVICE) on Windows

    May 16, 2023
  • View Success and Failed Local Logon Attempts on Windows

    May 2, 2023
  • Fix: “Something Went Wrong” Error When Installing Teams

    May 2, 2023
  • Querying Windows Event Logs with PowerShell

    May 2, 2023
  • Configure Windows LAPS (Local Administrator Passwords Solution) in AD

    April 25, 2023

Follow us

  • Facebook
  • Twitter
  • RSS
Popular Posts
  • How to Create a UEFI Bootable USB Drive to Install Windows 10 or 7?
  • Managing Printers and Drivers with PowerShell in Windows 10 / Server 2016
  • Deploy PowerShell Active Directory Module without Installing RSAT
  • Managing User Photos in Active Directory Using ThumbnailPhoto Attribute
  • RDP Brute Force Protection with PowerShell and Windows Firewall Rules
  • Match Windows Disks to VMWare VMDK Files
  • Active Directory Dynamic User Groups with PowerShell
Footer Logo

@2014 - 2023 - Windows OS Hub. All about operating systems for sysadmins


Back To Top