Skip to main content

Add-WifiProfile

Description

This script creates a new WiFi profile.

Usage

  1. Install and import the Strapper module.
  2. Install and import the wifimanagementprofile module.
  3. 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

ParameterValidateSetRequiredDefaultTypeDescription
ProfileNameTrueStringThe name of the WiFi profile to be created.
PasswordTrueStringThe password of the WiFi profile.
ConnectionModemanual, autoFalseautoStringThe connection mode of the WiFi profile.
Authenticationopen, shared, WPA, WPAPSK, WPA2, WPA2PSK, WPA3SAE, WPA3ENT192, OWEFalseWPA2PSKStringThe authentication method used by the WiFi profile.
Encryptionnone, WEP, TKIP, AES, GCMP256FalseAESStringThe encryption method used by the WiFi profile.
ConnectHiddenSSIDFalse$FalseBooleanWhether to connect to the WiFi even if the SSID is hidden.
OverwriteFalse$TrueBooleanWhether to overwrite the WiFi profile if it already exists.

Output

  • .\Add-WifiProfile-log.txt
  • .\Add-WifiProfile-error.txt