Quantcast
Channel: How to use And Or Filters in powershell where-object - Stack Overflow
Browsing all 2 articles
Browse latest View live

Answer by vrdse for How to use And Or Filters in powershell where-object

The extra Where-Object in your code should throw an error... Where-Object { $_.lastlogondate -le $When -AND $_.enabled -eq $True -AND ($_.AccountExpirationDate -gt (Get-Date) -OR...

View Article



How to use And Or Filters in powershell where-object

I am trying to get a list of properties of AD user objects. Most of the script works except the "where-object" filters are applied. I want to get all users who meet the following: LastLogonDate is more...

View Article
Browsing all 2 articles
Browse latest View live




Latest Images