First, let me show you the code
$url = Read-Host 'URL'
if ( $url -gt '.'){
msg * "The title does not contain(.)"
}
The code should alert you that the site does not have a dot
But either way the code alerts me
The code does not give me any error
-gtoperator seems a little far off for string comparison (what do you expect from$url "greater than" '.'?). Finally, the linemsg * "..."also looks fishy syntax wise.msg * ...line is legit; it's invoking themsg.exeutility, which simply pops up a dialog box with the message text and an OK button.if (!$url.Contains('.')) { msg * "Does not contain a dot" }.! $url.Contains('.')is propably the most efficient way. For completeness, using PowerShell operators:$url -notlike '*.*'