Changing user password from Office 365 portal

Hi all,

If you have configured Password write back on your AD Connect server or your users are cloud users, users are enabled to change their corporate password from Office 365 portal. To change the password from Office 365 follow the below steps:

Go to office 365 portal and login with your user account. Once done, push on Settings -> Password.


On Security and privacy push on Password.


On the new windows insert your actual password and the new password twice. Push on Send.


Once donde, you can use the new password where you want, on-premise and cloud.





Force AD Connect to sync with powershell

Hi all,

To force a syncronization of all identities with powershell use the below command:

  1. Open PowerShell with elevated rights.
  2. Execute Import-module ADSync.
  3. Execute Start-ADSyncSyncCycle –PolicyType Delta
  4. Check thru MIIS console it’s syncing.


Obtaining App Password on Office 365 to use Outlook or Skype for business rich client

Hi all,

If you have Multifactor Authentication configured on Office 365, when you want to use Outlook or Skype for business client, user need to insert that password and not his corporate password to use it.

Below I show you how to obtain App Password.

Log in O365 with your corporate user account and push on Settings -> Office 365.


Push on Security and privacy section -> Additional Security Check


Push on Update the phone numbers you use for account security.


On the new window, go to App Password section and push on Create button.


On the windows indicate a reference and push on Next.


Will appear the App Password. Copy it an push on close button.


Whe ypou configure an Outlook profile or want to access to Skype for business, paste that App Password.



Searching mailbox items on Exchange Online

Hi all,

If you need to find email items on a mailbox in your Exchange Online environment and export to a pst file follow the below steps.

Go to Ofice 365 and push on Security and Compliance tile.


In Content search push on + icon.


On the new window push a reference name and select:

  • Custom location selection
  • Choose specific mailboxes to search
  • Push on +


Push on + Add condition and indicate Participants -> contains any of -> and indicate email addressess.

If you need more conditions like date push on +Add condition and select Date -> after -> and date like in the image.

Push on Search.


In Content search you will see the new search generated. In the right pane you can see the options and the total items obtained. Push on Preview search results to check if it is what you are looking for.


That’s is:


Coming back to Content search area y0u are ready to download to a pst file the email items. Will appear a new window asking how you want to save it.

Once selected your preferences, push on Start export.


Copy to clipboard the key.


Will appear a new window, push on Install.


Wait the download.


On the new window, paste the key and select where to save the file. Push on Start.


Will start the download and after a few minutes, depending the weight, it will finish.



Force Online Archive when main mailbox is full


These days I am migrating from GMail to Exchange Online and I have found that if the user fills his main mailbox and you enable archiving this does not go into action at same moment, yo noeed to wait for 30-60 minutes.

For this you have to force it from powershell with the following command:

Start-ManagedFolderAssistant –Identity <mailbox>




Allowing mobile devices on Exchange Online with a bulk script

Hi guys,

In my last exchange migration to O365 my customer had the requirement to block all BYOD because for security reasons email department verify and manage all mobile devices. How? as always, asigning IMEI device ID to the user mailbox in O365.

Steps to acomplish that:

First of all you need to go to Exchange Online and there go to mobile section. Push on Edit.



On the window select Block access and push on save


After that action, you can use the below command to asign devices to usermailboxes:

Set-CASMailbox -ActiveSyncAllowedDeviceIDs “ID”

To check some user use:

Get-CasMailbox username | fl ActiveSyncAllowedDeviceIDs

If you have a large correlation of users – devices you can use my script. It’s very useful!!

  1.  You need a csv file with a list of users called migration.csv. Save it on C:\migration folder.


2. You need a file called Device_Info.csv where you have all device IMEI info exported from on-prem. Save it on C:\migration folder.


3. A csv file called LoteYYYYMMDD.csv where you have all users in O365.


4. The magic script:

[string]$Script:sourcefilename = “migration.csv”,
[System.Management.Automation.CredentialAttribute()]$cred = $null

Write-Host “This script must be run from a Powershell AD AZURE”
Write-Host “We load the list of users migrated from file $($Script:sourcefilename)”
$migrados = Import-Csv $Script:sourcefilename
if([String]::IsNullOrEmpty($cred)){$cred = Get-credential}

Write-Host “We load the list of devices.”
$Users = Import-Csv “C:\MIGRATION\Device_Info.csv” | Sort-Object PrimarySMTPAddress
$UserID = $null

Foreach ($user in $Users)
#Let’s see if the device line in the file contains a migrated user
$containsMailMigrado = $migrados | %{$_ -match $user.PrimarySMTPAddress}
If($containsMailMigrado -contains $true)
Write-Host ” Finded MailMigrado – $($user.PrimarySMTPAddress)”
$UserID = $user.PrimarySMTPAddress
$DeviceID = $user.DeviceID
Write-Host ” Adding device DeviceID = $($DeviceID)”
Set-CASMailbox -Identity $UserID -activesyncalloweddeviceid @{Add=$DeviceID}

Save that script as ScriptDevicesO365.PS1

Having all requisites showed above you can execute the line .\ScriptDevicesO365.PS1 LoteYYYMMDD.csv $UserCredential that will permit all your corporate devices be used with the assigned user on Office 365 – Exchange Online.





Mail Flow Statistics on Office 365


Today my customer request me about outbound mail flow statistics on Office 365 for his tenant.

I used the following syntax:

Get-MailTrafficReport -AggregateBy hour -StartDate 05/06/2016 -EndDate 06/01/2016 -EventType goodmail -Direction outbound | select date,messagecount > c:\temp\StatisticsO365.txt

This is the output:

Date MessageCount
—- ————

06/05/2016 6:00:00 6
06/05/2016 7:00:00 6
06/05/2016 8:00:00 11
06/05/2016 9:00:00 9
06/05/2016 10:00:00 8
06/05/2016 11:00:00 15
06/05/2016 12:00:00 12
06/05/2016 16:00:00 1
06/05/2016 18:00:00 1
08/05/2016 16:00:00 1
09/05/2016 6:00:00 12
09/05/2016 7:00:00 16
09/05/2016 8:00:00 13
09/05/2016 9:00:00 14
09/05/2016 10:00:00 11
09/05/2016 11:00:00 15