Product, version and build: PS Studio 2016, 5.2.117
32 or 64 bit version of product: 64bit
Operating system: Windows 10
32 or 64 bit OS: 64bit
I am trying to write a very small powershell script, most likely less than 10 lines to connect to a new wireless network and connect via username and password since this is an enterprise setting. Currently what I have is the following, it gets very close. It adds the wireless network profile from the xml file and then connects to it. The part I need help with is I have to physically click the wireless icon in windows 10 for it to then prompt for the credentials required to connect. Is there a way to make it prompt for username and password immediately after "connecting"?
netsh wlan add profile filename="filepath\profile.xml"
netsh wlan connect name="ProfileName"
New wireless connection Windows 10
Forum rules
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Re: New wireless connection Windows 10
This will get you started: http://www.hanselman.com/blog/HowToConn ... dows7.aspx
- WSUsoftware
- Posts: 30
- Last visit: Thu Feb 17, 2022 2:52 pm
Re: New wireless connection Windows 10
I use the commands in that link to "connect". It says connection successfully completed but then it won't prompt the user for login credentials to authenticate automatically. Once you just physically click on this icon it automatically brings up the window for wireless credentials and once they are entered it successfully is connected wirelessly.
Re: New wireless connection Windows 10
Sorry the best you can do is to store the credentials in Windows and they should be automatically used.
Did you read the whole article? You can specify using stored credentials in the profile.
Did you read the whole article? You can specify using stored credentials in the profile.
- WSUsoftware
- Posts: 30
- Last visit: Thu Feb 17, 2022 2:52 pm
Re: New wireless connection Windows 10
Unfortunately I can't use stored credentials. This is being used as part of a laptop personalization process for new users. They have credentials to connect to the Wireless Profile/Network as part of Group Policy. I used the "netsh wlan add profile filepath="filepath.xml" to add the new network connection and then the "netsh wlan connect name="profile" to connect to that network. Then the user is supposed to enter their network username and password to connect to the network I just added and from that point several other scripts kick off after. The goal of this being that the entire process is automatic up until the username and password is physically typed. It sounds like this isn't possible then?