Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

exchange powershell : get-user has no Description property?

When I run get-user|get-member in powershell with the exchange add-in I noticed there is no description property.

Does anyone know if it has been renamed to something else or another way of accessing it?

like image 252
phill Avatar asked Dec 18 '25 16:12

phill


1 Answers

If you aren't looking to change the description this should work:

[PS] C:\>$ANR = "[email protected]"
[PS] C:\>$foo = [adsi]("LDAP://" + (get-user $ANR).DistinguishedName)
[PS] C:\>$foo.description
My Description

If you are wanting to edit, you will need to get further into System.DirectoryServices & look at how to write objects back to AD. It would likely be simpler to use quest of another package that does some wrapping. If you want to roll your own there are gobs of blogs on AD programming in Powershell.

like image 160
slipsec Avatar answered Dec 20 '25 09:12

slipsec



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!