The following script works, but if I put an old email address that a user had it doesn't provide data. I want to show all the new and current emails address with me providing an old email address.
Here is my GitHub where to script is located.
https://github.com/On3n3xus/PowerShell/blob/main/ProxyAddresses
I'm trying to get all the ProxyAddresses data, if I only have an old email address.
Example:
$user = Get-ADUser -Filter { EmailAddress -eq "[email protected]" } -Properties proxyAddresses
$user.proxyAddresses
See: Getting the proxyaddresses attribute of users
You need to search the
proxyAddressesattribute.