Answers for "powershell if string contains"

0

powershell if string contains

$strVal ='Hello world'
if($strVal -like '*World*') {
      Write-Host 'Your string contains the word world'
} else {
      Write-Host 'Your string does not contains the word world'
}
Posted by: Guest on January-21-2022
0

powershell if string contains

$strVal ='Hello world'
if($strVal -like '*World*') {
      Write-Host 'Your string contains the word world'
} else {
      Write-Host 'Your string does not contains the word world'
}
Posted by: Guest on January-21-2022

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language