PowerShell

Office 365: Initiate a full password sync using DirSync

Having a need to rapidly sync passwords to Office 365 using Directly Sync (DirSync) I come across the following method that seems to work with minimal effort.  By default the DirSync only kicks off ever 3-5 min’s.

To initiate a full password sync you can do the following:

  1. Open PowerShell, and then type:

     
  2.  Then Type:

     
  3. Press Enter
  4. Load Services.msc
  5. Restart the Forefront Identity Manager Synchronization Service Service. (FIMSynchronizationService)

In your application event logs you should notices multiple events  of 656 (Password Sync Requests) and Even 657 (Password Sync Results) indicating that your full password sync has kicked off.

 

Office365: Using PowerShell to get Office365 license info

Working to apply bulk apply licenses I stumbled upon some useful commands to list the licenses assigned to my Office 365 Account.

The following command will list account Sku ID’s along with the active and consumed units. Best of all list them in a nice grid view

We can also pull the subset of information such as items include with pack we have.

The following command will list included service plans under our package

 

Office 365: Convert Mailbox to Shared Mailbox after Cutover Migration

When performing a cut-over migration the Exchange attribute indicating that the mailbox was a shared mailbox is lost. To correct this I have done the following steps:

List out all of the shared mailboxes form my on-premises Exchange and export them into a CSV file.

Now prepare the CSV file with the list of user principal names of all mailboxes to be converted. Make sure the column header for the user principal names is “UserPrincipalName”

Now we run the following powershell script to change the mailbox type of all items in the CSV file.

Please note

Running Exchange Online Powershell commands / scripts requires you have had installed the Microsoft Online Service Sign-In Assistant, Windows Powershell, Windows Azure Active Directory Powershell

For more info:

http://www.microsoft.com/en-us/download/details.aspx?id=41950

http://jermsmit.com/azure-active-directory-module-for-windows-powershell-how-to-connect/

 

Tech Short: Office365 – Convert select on-premises mailboxes to mail-enabled users

When you convert on-premises mailboxes to mail-enabled users (MEUs), the proxy addresses and other information from the Office 365 mailboxes are copied to the MEUs, which reside in Active Directory in your on-premises organization. These MEU properties enable the Directory Synchronization tool, to match each MEU with its corresponding cloud mailbox.

Using the steps provided here I was able to export a list of only user mailboxes and leaving out other mailbox types

Run the following PowerShell command:

The following full steps of what to do next can be found here: http://community.office365.com/en-us/w/exchange/835.cutover-exchange-migration-and-single-sign-on.aspx

Exchange 2013 – Delete all contents from mailbox

Using the following Exchange Management Shell command you can cleanup emails from a mailbox such as one used to catch spam emails:

You can also check the number of items in the mailbox by issues the following command: