jbla9028
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:)
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.
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}
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks guys. I Appreciate the help! I was able to finish the script with your suggestions. Thank you very much.
Glad to help :)
ASKER