![見出し画像](https://assets.st-note.com/production/uploads/images/116752027/rectangle_large_type_2_aa63a40df48b56f6b0605bc0b3742758.png?width=1200)
PowerShell 接続中のWiFiのSSID名が知りたい
あまり使い道が無いかもしれないんですが接続中のWiFiのSSID名を取得するスクリプトです。
### 接続中のWiFi SSID名
$SSID=""
$result=netsh wlan show interfaces
foreach($i in $result){
if($i.IndexOf(" SSID ") -ne -1){
$i=$i.replace("SSID ","")
$i=$i.replace(" ","")
$i=$i.replace(":","")
$SSID=$i
}
}
write-host $SSID
![](https://assets.st-note.com/img/1695384757499-kCETnaSwdM.png?width=1200)
#PowerShell #スクリプト #Windows #SSID #WiFi #自動化
こちらの記事もあわせてどうぞ