I'm trying to write a Powershell script that forwards an e-mail from X user and, based on that user's Organizational Unit in Active Directory, forward that e-mail to the correct department dealing with that OU. Is there a way to read OU given an e-mail address in Powershell?
Thanks in advance for reading.
Best,
Alex