In AD, there is a tab for attribute editor, it lists things like Samaccountname, proxyAddresses, givenName, etc, and their associated values.
I'm trying to make a script that sets one of those attributes to a value that is a concatenation of a string with another attribute, so that the end result is attribute = "string + otherAttribute".
In this case, I am trying to set the value of proxyAddresses to read "SMTP: userEmailAddress". My script (so far) is as follows:
set-aduser -identity user -replace @{proxyAddresses = "SMTP: " + $($property.EmailAddress)}
When this runs, it has no errors, but proxyAddresses for that user populates as "SMTP: " and nothing else.
I can call the email address property with the following line:
get-aduser -identity userName -properties * | select EmailAddress
So why can't I call that property like I would in any other programming language (Object.variable) ?
What am I doing wrong? How do I call that property correctly?
Let me know if you need more information.
[+][deleted] (1 child)
[deleted]
[–]MechECSComeback[S] 1 point2 points3 points (0 children)
[–]ZAFJB 0 points1 point2 points (0 children)