Add-WifiProfile
Description
This script creates a new WiFi profile.
Usage
- Install and import the Strappermodule.
- Install and import the wifimanagementprofilemodule.
- Attempt to create a new Wi-Fi profile with the specified parameters.
Create a new WiFi profile named 'MyWiFi' with the password 'MyPassword', using the default ConnectionMode, Authentication, and Encryption. The profile will overwrite the existing WiFi profile if it already exists.
.\Add-WifiProfile.ps1 -ProfileName 'MyWiFi' -Password (ConvertTo-SecureString 'MyPassword' -AsPlainText -Force)
Parameters
| Parameter | ValidateSet | Required | Default | Type | Description | 
|---|---|---|---|---|---|
| ProfileName | True | String | The name of the WiFi profile to be created. | ||
| Password | True | String | The password of the WiFi profile. | ||
| ConnectionMode | manual, auto | False | auto | String | The connection mode of the WiFi profile. | 
| Authentication | open, shared, WPA, WPAPSK, WPA2, WPA2PSK, WPA3SAE, WPA3ENT192, OWE | False | WPA2PSK | String | The authentication method used by the WiFi profile. | 
| Encryption | none, WEP, TKIP, AES, GCMP256 | False | AES | String | The encryption method used by the WiFi profile. | 
| ConnectHiddenSSID | False | $False | Boolean | Whether to connect to the WiFi even if the SSID is hidden. | |
| Overwrite | False | $True | Boolean | Whether to overwrite the WiFi profile if it already exists. | 
Output
- .\Add-WifiProfile-log.txt
- .\Add-WifiProfile-error.txt