Link to home
Start Free TrialLog in
Avatar of jbla9028
jbla9028Flag for United States of America

asked on

Powershell help filtering an existing Array

I have an existing Array that I've created with the following code (helped by another member of EE:)

Foreach ($ou in $OUList){$results = Get-ADUser -SearchBase $ou -Filter { memberof -ne $HitachiGroupDN -and memberof -ne $TestAccountsGroupDN -and memberof -ne $ServiceAccountsGroupDN -and enabled -eq 'True'} -Properties  mail,GivenName,sn,Department,WhenCreated,thumbnailphoto}

Open in new window


I have another script that I need to take this same list, and figure out who doesn't have a value in the AD Attribute "thumbnailphoto". How do I pass the variable back in ? would I use a foreach and go back through the $results variable?

Any help would be appreciated.
SOLUTION
Avatar of J0rtIT
J0rtIT
Flag of Venezuela, Bolivarian Republic of image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jbla9028

ASKER

Thanks guys. I Appreciate the help!  I was able to finish the script with your suggestions. Thank you very much.
Thanks guys. I Appreciate the help!  I was able to finish the script with your suggestions. Thank you very much.