实现效果: 使用方法:实现代码:function Show-NetList { Param([switch]$off) $arg=if($off.IsPresent){"add"}else{"delete"} netsh wlan $arg filter permission=denyall networktype=infrastructure >Out-Null }