Forum Discussion
flaviopbadmin
Jun 29, 2022Copper Contributor
Powershell and filtering results from cmdlest into CSVs
Hi everyone, I need to have a script that outputs a CSV list, to be used for a mail merge, with the last login and the alternative emails (and other useful info for the mail merge), so I can mass...
LainRobertson
Jun 29, 2022Silver Contributor
Edited as my original statement was incorrect. I wasn't paying close enough attention to your hashtable where you use a different variable name.
That being the case, I can't see any issue.
As a basic cross-reference against $Results, if you run the following, do you get a return value for Count greater than zero?
($Results | Where-Object { $_.LastSignInDate -eq $null }).Count
Cheers,
Lain