$text1 = "this is all lower-case"$text2 = "this is NOT all lower-case" $text1 -cmatch "[A-Z]"$text2 -cmatch "[A-Z]"结果将返回”true”或”false”
$text1 = "this is all lower-case"$text2 = "this is NOT all lower-case"$text1 -cmatch "^[a-zs-]*$"$text2 -cmatch "^[A-Zs-]*$"结果将返回”true”或”false”