Code: Select all
$Global:coll = (Get-ADUser -filter * -Properties PasswordNeverExpires, passwordlastset, lastlogon, enabled | select Name, Enabled, PasswordNeverExpires, PasswordLastset, @{ name = "LastLogon"; Expression = ({ get-date $_.lastlogon -UFormat "%D %R" }) })
Update-DataGridView $datagridview6 $coll
I have a group box that contains several checkboxes such as:
[ ] Non-Expiring Accounts (this would slim the datagridview to just showing non-expiring accounts)
[ ] Older than 90 days (this would display accounts older than 90 days)
etc
My issue with this is when I click Non expiring password box, it slims down the list to only show those, but what if i wanted to see non expiring AND older than 90 days?
What is the best way to achieve this?
Should I have it show non expiring, then re-query the orignal data (stored in $coll) and add that to the datagridview then remove duplicates?
Any suggestions would be appreciated