I was writing a function today where I need the outcome to be true if A or B equal C, where see is the results of a Get-ItemProperty
Originally I had:
If $a -eq Get-ItemProperty…
Of course in order to avoid running the Get-ItemProperty cmdlet twice (due to needing to comapre it against $b as well) I have assigned the results to variable $C for use in the if statement.
Normally I would write this If A equals C or If B Equals C but was wondering, is there is a way to structure this as If A or B equal C?
Not really a big deal I was just curious if it were possible.