Disable-Mailuser deletes Custom Attributes!!
Can someone please confirm this for me. This is really bad and I'm confident it's not expected behavior. Disable-MailUser: Exchange 2010 Is clearing all Custom Attribute Information from an AD User Object I was under the assumption (based on MSFT documentation) Disable-MailUser ONLY removes EXCHANGE information. Not Custom Attributes. Steps: Create new User jsmith Set extensionAttribute1 = test Set extensionAttribute2 = stringtest Set extensionAttribute3 = testagain Enable-MailUser -Ident jsmith -Alias jsmith -ExternalEmailAddress "johnsoutemail@something.com" -PrimarySmtpAddress "johnsoutemail@something.com" Disable-MailUser -Ident jsmith extensionAttribute1, extensionAttribute2, extensionAttribute3 are now null. Proof below: [PS] C:\Scripts>foreach ($user in (Get-QADUser user.test -IncludedProperties extensionAttribute3)){ >> $USERNAME=$user.Name >> $GUID=$user.GUID >> $OUTSIDE_EMAIL=$user.extensionAttribute3 >> >> "$USERNAME - $GUID - $OUTSIDE_EMAIL" >> >> } >> user.test - 393b882a-ce46-4aaf-9364-43ce91f70e8a - outsideemail@something.com [PS] C:\Scripts>Disable-MailUser -Identity "user.test" -Confirm:$False [PS] C:\Scripts>foreach ($user in (Get-QADUser user.test -IncludedProperties extensionAttribute3)){ >> $USERNAME=$user.Name >> $GUID=$user.GUID >> $OUTSIDE_EMAIL=$user.extensionAttribute3 >> >> "$USERNAME - $GUID - $OUTSIDE_EMAIL" >> >> } >> user.test - 393b882a-ce46-4aaf-9364-43ce91f70e8a - Is this expected behavior?
January 7th, 2010 5:37am
On Thu, 7-Jan-10 02:37:43 GMT, Matty_C wrote:>Can someone please confirm this for me. This is really bad and I'm confident it's not expected behavior. It may not be expected by you, but it really is the expected behavior.The extentionAttributeX set of values (and many others) are presentonly for mail- and mailbox-enabled users.>Disable-MailUser: Exchange 2010 Is clearing all Custom Attribute Information from an AD User Object I was under the assumption (based on MSFT documentation) Disable-MailUser ONLY removes EXCHANGE information. Not Custom Attributes. But "Custom Attributes" ARE Exchange information.>Steps: Create new User jsmith Set extensionAttribute1 = test I don't see any -CustomAttributeX parameters on the set-user cmdlet.What are you using to populate those attributes?---Rich MatheisenMCSE+I, Exchange MVP
---
Rich Matheisen
MCSE+I, Exchange MVP
Free Windows Admin Tool Kit Click here and download it now
January 7th, 2010 7:03am
I agree with Rich.Please post the detail information about how did you create custome attribute. Please try to use ADSIedit.msc to check the attribute on user.Regards,Xiu
January 8th, 2010 10:25am
They are being written by another process over LDAP. I didnt know extensionAttributesN's were for Mail specific things. I kinda assumed they were msExch* ones.
Free Windows Admin Tool Kit Click here and download it now
January 8th, 2010 6:33pm
On Fri, 8-Jan-10 15:33:07 GMT, Matty_C wrote:>They are being written by another process over LDAP. I didnt know extensionAttributesN's were for Mail specific things. I kinda assumed they were msExch* ones. The attributes extensionAttribute1 - extensionAttribute15 are optionalattributes in the schema class msExchangeCustomAttributes. ThemsExchangeCustomAttributes class is an auxiliary class of other ADobjects such as "user".So, while any "user" can have the extensionAttributeX populated,they're only expected to be present on AD objects that are mail- ormailbox-enabled. If the AD object isn't one that the Exchange cmdletscan deal with then the "Exchange" attributes won't be altered. However, if the object IS one of the objects that those cmdlets shouldmanage they're certainly going to remove all the attributes in theauxilliary classes associated with Exchange if the object is to bemail-DISabled.---Rich MatheisenMCSE+I, Exchange MVP
---
Rich Matheisen
MCSE+I, Exchange MVP
January 9th, 2010 7:32am