Hi,
I'm guessing this is pretty easy when you know how, but I don't know the syntax. I'm querying AD and want to process users in an OU, but I only want to process users who have proxyAddresses set. How can I do this? Currently my code falls over whenever a user with the proxyAddresses not set is present in my OU. The "=*" hasn't worked
Thanks
Import-ModuleActiveDirectory
$users=([ADSI]"LDAP://OU=test,OU=FIMObjects,OU=Accounts,DC=mydom,DC=local").PSBase.Children
Foreach($userin$users){
#only run on user if attribute exists
if($user.get("Proxyaddresses")=*){}}