WiFiProfileManagement
WiFiProfileManagement copied to clipboard
How add the username, user password, change settings on a new profile
Thank you for making all these P.S. available, but I realized when creating new profiles, setting new profiles I do not see possible to add the user and the user password that will connect to the wi-fi.
Yes, that is right. It looks like it is possible to create a new profile, but once you connect to the profile there will be an on-screen popup asking for username and password. It would be nice when there is a function to supply these from powershell too. Apparently there is a function WlanSetProfileEapUserData that is supposed to handle that, but I cannot find a cmdlet that allows calling it from powershell.
The credentials are stored in the Windows registry at: HKLM\SOFTWARE\Microsoft\Wlansvc\UserData\Profiles{GUID}
You can find tools to encode and decode this on the web. Once set you do not need to enter the credentials for the profile.
Reference: https://stackoverflow.com/questions/15478107/saving-windows-wireless-profile-credentials
I found the program WLANSetEAPUserData by Simon Rozman that sets the EAP credentials from an XML file. It just calls the function WLANSetEAPUserData I mentioned above.