I have a csv which contains UPNs for users which are within multiple domains in our forest. I need to clear the description for these accounts but for the life of me, I cannot get the script I have to work!
But providing no examples of a upn and what you are trying to extact. The basic idea is if you can extract that name from the UPN and it is resolvable in DNS, then you can use it as the -Server param and do the lookup in the proper domain. If DNS will not work, you would need to manually define DNS resolvable domain controllers to do the lookups.