To compare strings in PowerShell that contain question marks (?), you can use the -like operator along with wildcard characters. For example, to compare two strings that may contain a question mark, you can do something like this:
$string1 = "Hello, world?"
$string2 = "Hello, everyone!"
if ($string1 -like "*?*") {
Write-Host "String 1 contains a question mark"
}
if ($string2 -like "*.