$date = (Get-Date).AddDays(-1).ToString(‘MM/dd/yyyy’)
[String]$Match = $content | select-string -Pattern “(Successful incremental backup|$date )”
This is a statement I am using in my script. So it gives me all the matches which has yesterday
s date in any statmeent. Now , I want a result which has a statement containing yesterdays date along with “successful incremental backup”
This is what I want to search :
02/19/2017 00:49:21 Successful incremental backup of ‘\bentpsystpc02\d$’
So , if | stands for OR , how can I represent AND ???