Forum Discussion

  • are you asking for a powershell script that check if that email exists on your exchange ?
      • eliekarkafy's avatar
        eliekarkafy
        MVP

        Here's a PowerShell script to check if an email exists or not in Active Directory:

        $email = "email address removed for privacy reasons" # replace with the email you want to check
        $exists = Get-ADUser -Filter {EmailAddress -eq $email} -Properties EmailAddress

        if ($exists) {
        Write-Host "The email address $email exists in Active Directory."
        } else {
        Write-Host "The email address $email does not exist in Active Directory."
        }

         

        Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily.

Resources