运维网's Archiver
论坛
›
Shell/Powershell
› powershell switch和正则表达式
yiwai
发表于 2018-9-2 12:03:16
powershell switch和正则表达式
$strPattern="软件版本"
$text=net config workstation
switch -Regex ($text)
{
$strPattern {Write-Host $switch.current}
}
页:
[1]
查看完整版本:
powershell switch和正则表达式