cmd 命令:@for /f "skip=10 tokens=1* delims=: " %a in ('netsh wlan show profiles') do @for /f "tokens=1* delims=: " %c in ('netsh wlan show profiles "%b" key^=clear^|findstr /r "关键内容"') do @echo;&@echo;SSID:%b&@echo;密码:%d (如果要改成bat的话,下一行 加 pause ) PowerShell命令:foreach ($item in (netsh wlan show profile|where{ $_ -match "文件"})){netsh wlan show profile name=($item -replace " 所有用户配置文件 : ","") key=clear|where{ $_ -match " 名称|关键内容"}}