Dear, Team
solution is very good to find a text in the line.
Can you give me an idea that.
====script snippet====
$lines = @()
$txt1 = "Chassis-1"
$txt2 = "PS-1"
foreach ($line in $orgtxt) {
switch -wildcard ($line)
{
"*$txt1*" {$lines += $line.Trim()} <== Variables not seems be working here
"*txt2*" {$lines += $line.Trim()} <== Variables not seems be working here
}
}
$lines
====script====
above script is not working,,,,,how can i make it working..?? give me an idea plz.
Best Regards.