$certThumbprint = "[証明書のThumbprint]"
$wifiProfile = "[接続プロファイル名]"
$username = "[ユーザー名]"
$password = "[パスワード]"
# 証明書を選択する
$cert = Get-ChildItem -Path Cert:\LocalMachine\My | Where-Object {$_.Thumbprint -eq $certThumbprint}
netsh wlan set profileparameter name="$wifiProfile" authentication="WPA2Enterprise" -userCertificate="$($cert.Thumbprint)" -storeCredential=yes
# 接続ユーザーを入力する
netsh wlan add profileparameter name="$wifiProfile" userAuth="yes" authMode="userOrMachine" -username="$username" -password="$password"
# 無線LANネットワークに接続する
netsh wlan connect name="$wifiProfile"
More than 1 year has passed since last update.
Register as a new user and use Qiita more conveniently
- You get articles that match your needs
- You can efficiently read back useful information
- You can use dark theme