Monthly Archives: May 2015

Office 365: Manage distribution groups that I own…

In Office 365 Outlook Web Access allows for individuals to manage distribution groups that the own.  Originally the distribution groups option was found by selecting the GEAR in the upper right hand corner and selecting the options menu.

 

image

 

When selecting options the subsequent dialog has a GROUPS feature where individual users can manage the distribution groups they own.

 

image

 

In the current release of Outlook Web Access ( May 2015 ) when selecting the options button a new set of options is displayed.  The groups option is not a top level option or sub-option.

 

image

 

How does an individual access the groups option to manage the groups they own?  In this new options dialog is the OTHER selection.  When selecting OTHER the following is displayed:

 

image

 

The OTHER –> GO TO EARLIER VERSION presents the original dialog to the user.  This restores access to the groups function.

 

image

 

Using this new path individuals can access the functions to manage distribution groups they own.

Office 365: Bulk update email addresses

In Office 365 there may be a need to perform a bulk update to email addresses across accounts.  The accepted domain may need updating as new domains are added or the email address prefix may be changing. 

 

In an on-premises environment the bulk modification of email addresses can be performed through adjustments in the recipient update service and recipient policies.  When directory synchronization is used with Office 365 this is still a viable method – as proxy addresses is sourced on premises.  (Note:  If no on premises server exists proxy addresses must then be manually modified in the Active Directory).  As the proxy addresses are changed on premises the directory synchronization process will replication the changes into Office 365.

 

If mailbox and user accounts are created directly in Office 365 then administrators must adjust the email addresses in Office 365.  Within Office 365 there is no recipient update service or recipient policies that can be adjusted to perform these modifications in bulk.  Each email address modification must occur directly on the user.  If a small number of users are involved in the change then using the Exchange portal may be the easiest method to process the change.  When the change must occur over a bulk of users then it may be helpful to script these changes.

 

In this scripting example the desire is to change the email address from alias@acceptedDomain.com to firstInitial.lastName@acceptedDomain.com.  To begin the list of mailboxes that require the change need to be parsed into a variable.  To gather the recipients we will use the get-recipient command.  The get-recipient command returns the list of proxy addresses on the users which will be helpful in further script steps.  The command in this example should only return recipients that are mailboxes. 

 

#Get a list of recipients.  Command may be further scoped as necessary to include only a subset of mailboxes.

$recipients=get-recipient –resultSize:UNLIMITED –recipientType:USERMAILBOX

 

With the recipients extracted we must now iterate through them.  In this iteration we will collect the email addresses off the user into a variable.  We will then construct the new email addresses for the user by first converting the primary proxy address of the user signified with SMTP: to a secondary address signified by smtp:.  The new email address will then be constructed, set as primary, and added to the list of email addresses.  The list of email addresses is then committed to the mailbox.

 

#Iterate through the list of mailboxes

$recipients | foreach {

#Extract email addresses to a variable

$emailAddress = $_.emailAddresses

#Convert exist primary proxy address to a secondary email address

$newEmailAddress = $emailAddress.replace(“SMTP”,”smtp”)

#Construct the new email address, set it as primary, and add it to the list of existing email addresses.

#The use of SMTP: signifies primary email address.

#Substring is utilized to extract the first initial of the users first name.

$newEmailAddress=$newEmailAddress + (“SMTP:” + ($_.firstName).substring(0,1) + “.” + $_.lastName + “@acceptedDomain.com”)

#Commit the new set of email addresses to the mailbox.

set-mailbox –identity $_.alias –emailAddresses $newEmailAddress

}

 

When constructing the new email addresses different variations may be utilized.  The current primary SMTP address must always be converted to secondary prior to creating new primary addresses.  For example, if firstName.lastName was the desired email address the following syntax could be used:

 

$newEmailAddress=$newEmailAddress+ (“SMTP:” + $_.firstName + “.” + $_.lastName + “@acceptedDomain.com”)

 

The script blocks used here can be combined into a single *.ps1 file. 

 

A special thanks to Matt Byrd for assisting in the final syntax.

Exchange 2010 / Exchange 2013 – Determining the repair count of a database.

On the EHLO blog we recently announced a support change for databases that have been repaired.  The updated policy can be found here – https://aka.ms/m6o4vl.

 

A question that has been asked after reading this policy is whether or not the repair count can be determined while the database is online.  The answer is – it depends.  Get-MailboxDatabase –status does not currently support returning the repair count of a database.  We are currently exploring options in Exchange 2013 of adding this functionality to get-mailboxDatabase.  In the meantime – how can an administrator determine the database repair count?  For the purposes of this blog we will be focusing on Exchange 2010 and newer.  If you are still on a version of Exchange less than Exchange 2010 you probably need to be less worried about the repair count on your database and more focused on getting that migration done.

 

Our preferred method of checking the repair count would be to suspend a passive copy of a database in a database availability group and perform the eseutil /mh operation.  When a passive copy is suspended log replay stops and active locks against the database are released allowing this to work. 

 

suspend-mailboxDatabaseCopy –identity <DBNAME><SERVERNAME>

 

For example:  Suspend-MailboxDatabaseCopy DAG-DB0MBX-1

 

Using get-mailboxdatabasecopystatus we can verify the database is successfully suspended. 

 

[PS] C:>Get-MailboxDatabaseCopyStatus DAG-DB0MBX-1

Name             Status          CopyQueue ReplayQueue LastInspectedLogTime   ContentIndex
                                 Length    Length                             State
—-             ——          ——— ———– ——————–   ————
DAG-DB0MBX-1    Suspended       0         0           5/6/2015 12:54:27 PM   Suspended

 

With the database suspended and locks released an administrative command prompt can be utilized to dump the header of the database with eseutil. 

 

PS C:ExchangeDatabasesDAG-DB0DAG-DB0.db> eseutil /mh .DAG-DB0.edb

 

Extensible Storage Engine Utilities for Microsoft(R) Exchange Server
Version 15.00
Copyright (C) Microsoft Corporation. All Rights Reserved.

Initiating FILE DUMP mode…
         Database: .DAG-DB0.edb

……

    Repair Count: 0
     Repair Date: 00/00/1900 00:00:00.000
Old Repair Count: 0

……

  Last checksum finish Date: 04/28/2015 11:21:24.442
Current checksum start Date: 00/00/1900 00:00:00.000
      Current checksum page: 0

Operation completed successfully in 0.125 seconds.

 

When this operation is completed the database can be resumed with resume-mailboxdatabasecopy and validated with get-mailboxdatabasecopystatus.

 

Resume-MailboxDatabaseCopy DAG-DB0MBX-1

 

[PS] C:>Get-MailboxDatabaseCopyStatus DAG-DB0MBX-1

Name               Status          CopyQueue ReplayQueue LastInspectedLogTime   ContentIndex
                                   Length    Length                             State
—-               ——          ——— ———– ——————–   ————
DAG-DB0MBX-1      Healthy         0         0           5/6/2015 1:29:31 PM    Healthy

 

Bonus:  If using Exchange 2007 with cluster continuous replication (CCR) you should be able to use a very similar process.

 

What happens when I have only a single copy database – for example public folder databases or in single server shops.  Fear not – there is a way to do this without dismounting the database.  The ESEUTIL command has been extended with a function /vss.  The /vss extension invokes a VSS copy of the database file and then performs the specified eseutil command.  This can be used against any active or passive database copy without dismounting or suspending.

 

In this example DAG-DB3 is mounted on server MBX-1. 

 

[PS] C:>Get-MailboxDatabaseCopyStatus DAG-DB2MBX-1

Name               Status          CopyQueue ReplayQueue LastInspectedLogTime   ContentIndex
                                   Length    Length                             State
—-               ——          ——— ———– ——————–   ————
DAG-DB2MBX-1      Mounted         0         0                                  Healthy

 

Using an administrative command prompt and navigating to the database directory the eseutil command is issued.

 

PS C:ExchangeDatabasesDAG-DB3DAG-DB3.db> eseutil /mh /vss .DAG-DB3.edb

Extensible Storage Engine Utilities for Microsoft(R) Exchange Server
Version 15.00
Copyright (C) Microsoft Corporation. All Rights Reserved.

Initializing VSS subsystem…

Initiating FILE DUMP mode…
         Database: \?GLOBALROOTDeviceHarddiskVolumeShadowCopy283DAG-DB3.dbDAG-DB3.edb

DATABASE HEADER:
Checksum Information:
Expected Checksum: 0x3d36a729
  Actual Checksum: 0x3d36a72

……

    Repair Count: 0
     Repair Date: 00/00/1900 00:00:00.000
Old Repair Count: 0

……

  Last checksum finish Date: 04/30/2015 22:37:58.860
Current checksum start Date: 00/00/1900 00:00:00.000
      Current checksum page: 0

Operation completed successfully in 2.516 seconds.

 

The passive database copy for DAG-DB2 resides on MBX-2

 

[PS] C:>Get-MailboxDatabaseCopyStatus DAG-DB2MBX-2

Name                  Status          CopyQueue ReplayQueue LastInspectedLogTime   ContentIndex
                                      Length    Length                             State
—-                  ——          ——— ———– ——————–   ————
DAG-DB2MBX-2         Healthy         0         0           5/6/2015 2:06:10 PM    Healthy

 

Using an administrative command prompt and navigating to the database directory the eseutil command is issued.

 

PS C:ExchangeDatabasesDAG-DB3DAG-DB3.db> eseutil /mh /vss .DAG-DB3.edb

Extensible Storage Engine Utilities for Microsoft(R) Exchange Server
Version 15.00
Copyright (C) Microsoft Corporation. All Rights Reserved.

Initializing VSS subsystem…

Initiating FILE DUMP mode…
         Database: \?GLOBALROOTDeviceHarddiskVolumeShadowCopy127DAG-DB3.dbDAG-DB3.edb

DATABASE HEADER:
Checksum Information:
Expected Checksum: 0x3b39abb6
  Actual Checksum: 0x3b39abb6

……

    Repair Count: 0
     Repair Date: 00/00/1900 00:00:00.000
Old Repair Count: 0

……

  Last checksum finish Date: 02/11/2015 05:55:51.971
Current checksum start Date: 03/11/2015 05:10:50.540
      Current checksum page: 297568

Operation completed successfully in 2.172 seconds.

 

The ESEUTIL /vss option is an excellent method to determine the repair count without taking your database offline.

 

What if you are running Exchange 2007 or older?  Unfortunately you will have to dismount your databases to make this determination.