I am writing a powershell script but having a problem evaluating a boolean expression.
This is the line of code I am having a problem with:
if (Get-Content .\Process2Periods.xmla | Select-String ((Get-Date) | Get-Date -Format "yyyyMM") -quiet -ne True)
I am getting this error message when trying to run:
Select-String : A parameter cannot be found that matches parameter name 'ne'.
Please help me understand the issue.
Also for a little context, I am searching a file for a string and if it doesn't exist I want to execute what is in the if block. I didn't paste the code in the if statement because I don't believe it is relevant but please let me know if you would like to see it.