String nach einem Teilstring durchsuchen

ID229
Link ReferenceNot set
Link CreditsNot set
Link Technical DocumentationNot set
PlCodelangPowerShell
PlGroupStrings
PlItemTitleString nach einem Teilstring durchsuchen
Code# See also a good hint with explanation between like and contains:
# http://windowsitpro.com/blog/powershell-contains

$fullstring = "This is my string";

if ($fullstring -like "*my*")
{
Write-Host "found" -ForegroundColor Green;
}
else
{
Write-Host "nope" -ForegroundColor Red;
}
Result Example