How to connect to a wifi in powershell knowing the SSID and password?

前端 未结 2 555
旧巷少年郎
旧巷少年郎 2021-02-04 07:34

How can I connect to a wifi in powershell just like through GUI but by using code? what commands do I use? I know the SSID and the password.

EDIT: I have never connected

2条回答
  •  说谎
    说谎 (楼主)
    2021-02-04 08:10

    netsh wlan connect ssid=YOURSSID name=PROFILENAME
    

    this should be it...

    EDIT: Try this, just worked for me :)

    netsh wlan connect ssid="YOURSSID" key="YOURPW"
    

提交回复
热议问题