Setting Custom Attributes for Users

In order for our Distribution groups to work properly, you need to set Custom Attributes to read X based on which department(s) they are in:


IT CAD Mechanical Electrical Plumbing Civil Structural Telecom Architectural Administration
customattribute1 customattribute2 customattribute3 customattribute4 customattribute5 customattribute6 customattribute7 customattribute8 customattribute9 customattribute10



So, if they are in the CAD, Mechanical, Electrical and Plumbing departments, you would set Custom Attributes 2, 3, 4 & 5 to X


You also need to set Custom Attribute 11 to match the City Name, the valid values for City Name and Attribute 11 are:

     

City
customattribute11
Buena Park
Torrance
Ortigas Center, Pasig City
Bacolod City


In order to set the custom attributes, you need to use Windows Powershell with the following commands:

$UserCredential = Get-Credential

Username: globaladmin@breeneng.com

Password: BE1adm1n1983


$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection


Import-PSSession $Session



To set the attributes, use:

Set-Mailbox -Identity  - 


So for someone@breeneng.com that is Mechanical, Electrical, Plumbing and in Torrance, it would be:

Set-Mailbox - Identity someone@breeneng.com -Customattribute3 X

Set-Mailbox - Identity someone@breeneng.com -Customattribute4 X

Set-Mailbox - Identity someone@breeneng.com -Customattribute5 X

Set-Mailbox - Identity someone@breeneng.com -Customattribute11 Torrance


When you are finished, be sure to use:

Remove-PSSession $Session



Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.