Search a String for Text or a Pattern

1. Problem
You want to determine if a string contains another string, or want to find the position of a string within another string.
2. Solution
PowerShell provides several options to help you search a string for text.
Use the –like operator to determine whether a string matches a given DOS-like wildcard:
        PS >”Hello World” -like “*llo W*”
        True
[...]