Now the society has been a scanner era, can be solved by scanner, never manually input. Therefore, the generation of two-dimensional codes is just needed at present. Today, the developpaer editor shares a little trick for you: using PowerShell to generate WiFi hotspot codes in Win10 system, and sharing WiFi hotspot, contact, geographic location and other information with your friends. Interested friends and Xiaobian go to the following to learn about it!
Installation of import QRCodeGenerator module
First, we need to install the import QRCodeGenerator module for Windows PowerShell.
The methods are as follows:
Right-click the Win10 Start button, select “Windows Power Shell (Administrator)”, enter and return to run the following commands:
Install-Module -Name QRCodeGenerator
It is prompted that you need to install the import NuGet provider and enter Y consent. It then prompts you whether to install modules from an untrusted PS Gallery repository and enter A with full approval. The QRCodeGenerator module is then installed automatically.
Before importing the QRCodeGenerator module next, we need to change the Unrestrict execution policy:
Enter A to agree to change the execution policy. Then you can run the following command to import the QRCodeGenerator module.
2. Generating WiFi Hotspot Two-Dimensional Codes
Run the following commands in turn in Windows PowerShell:
Wifi= “Win10 Professional Network”
$wifi -Password $pwd -OutPath $path
PS: Modify the WiFi SSID name, password and two-dimensional code image storage location according to their own reality.
Then we can see the newly generated two-dimensional code picture win10-wifi.png in the E: Temp directory. As shown in the picture:
3. Generating Contacts and Geographical Location Codes
In addition to generating WiFi hotspot two-dimensional codes, you can also use the QRCodeGenerator module of Windows to generate contact or geographic location two-dimensional codes. Examples of commands are as follows:
Generate contact two-dimensional code:
$companyname= “Win10 Professional Network”
$path=”E:\Temp\Master.png”New-QRCodeVCard -FirstName $firstname -LastName $lastname -Company $companyname –
Email $email -OutPath $path
Generating Geographic Location Two-Dimensional Code:
$address=”3350 Microsoft Way, Redmond, WA 98052″
New-QRCodeGeolocation -Address $address -OutPath $path
Above is the introduction of using PowerShell to generate WiFi hotspot two-dimensional code in Win10 system brought by Xiaobian. I hope it will be helpful for you. Small partners can come to developpaer website when they are free. There are many other materials on our website waiting for small partners to dig out.