尝试在此 Exchange 命令上应用以下正则表达式时出现以下错误。
@(Get-ExchangeServer | Format-List AdminDisplayVersion) | % { [regex]::Match($_, "^\sVersion (\d+\.\d+(\.\d+)?)\s").Success }
该命令Get-ExchangeServer | Format-List AdminDisplayVersion
返回以下内容:
[PS] C:\Windows\system32>Get-ExchangeServer | Format-List AdminDisplayVersion
AdminDisplayVersion : Version 14.0 (Build 442.3)
AdminDisplayVersion : Version 14.0 (Build 442.3)
当将正则表达式应用于它时,我得到了所有错误:
[PS] C:\Windows\system32>@(Get-ExchangeServer | Format-List AdminDisplayVersion) | % { [regex]::Match($_, "^\sVersion (\
d+\.\d+(\.\d+)?)\s").Success }
False
False
False
False
False
False
关于我做错了什么的任何指示?