troubleshooting Question

Powershell help filtering an existing Array

Avatar of jbla9028
jbla9028Flag for United States of America asked on
Powershell
5 Comments2 Solutions175 ViewsLast Modified:
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.
ASKER CERTIFIED SOLUTION
Ben Personick (Previously QCubed)
Lead SaaS Infrastructure Engineer

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 2 Answers and 5 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 2 Answers and 5 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros