Quantcast
Channel: Making an "and" statement to match more than 1 value - Stack Overflow
Browsing latest articles
Browse All 3 View Live

Answer by Lee for Making an "and" statement to match more than 1 value

Logical and is done using -and in powershell:| Where {$_.property -eq statement -and $_.anotherproperty -eq anotherstatement}

View Article



Answer by RB. for Making an "and" statement to match more than 1 value

The syntax you are looking for is -and and -or. This example prints "Hello" if the variable a is greater than 9 and less than 11.$a = 10if ($a -gt 9 -and $a -lt 11) { Write-Host "Hello" }Please see the...

View Article

Making an "and" statement to match more than 1 value

I got this part of a script| Where {$_.property = statement}I would like to add another value so that it has to match both values, so the command is going to work kinda like this| Where {$_.property...

View Article
Browsing latest articles
Browse All 3 View Live




Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>
<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596344.js" async> </script>