How to export office 365/Exchange online mailbox to PST.

Hello, in this post we are going to see how to export an Office 365 (Exchange online) mailbox content to a PST file. This process can also be used to search for SharePoint, OneDrive, Teams sites, Office 365 group… content. Now that we have set the scene, we can get started.

In the Security and compliance center (https://protection.office.com), under “Search” click on “Content Search”

In the content search portal, start a New search

Check “Specific location” and select modify to specify the location/mailbox you want to export the content from.

On the next tab, click on “choose users, groups or teams” and specify the mailbox for which you want to export the content to PST.

Select the checkbox and click on Choose, selct Done and on the next tab click on Save to validate your choice.

Save and run to start the content search process.

Give a name to your content search process and click save to start the search.

Once the content search of the mailbox you specified is done, in the menu select Export results.

In the next tab, select the export options according to your need and click on “Export”

The export process has now started, you can see the status in the Exports tab by clicking on the name you gave to your export.

Once the export status is completed, you now can start downloading the result.

Clique on “Copy to clipboard” to copy the “Export secret” and click on “Download the result”. On the next page, enter the Export secret and specify the location where to save the pst file.

Start the downloading process – sorry, my OS is in french version 🙂 . At the end of the downloading, retrieve the pst file in the location you previously specified.

Et voilĂ  !

Active Directory – CrĂ©er des comptes utilisateurs Ă  partir d’un fichier Csv

Dans cet article nous allons voir comment crĂ©er des comptes d’utilisateurs dans Active Directory Ă  partir d’un fichier Csv.

Prenons l’exemple de ce fichier ci-dessous qui contient la liste des utilisateurs que nous souhaitons crĂ©er. Veuillez noter que la premiĂšre ligne concerne les entĂȘtes de notre fichier csv qui sont en rĂ©alitĂ©s quelques attributs des comptes que nous allons crĂ©er.

Enregistrer votre fichier en tant que c:\users.csv puis utiliser le script ci-dessous pour créer les comptes :

#Bulk users accounts creation

$csv = Import-csv -Path c:\users.csv -Encoding UTF8 -Delimiter ";" 
$path = "OU=SITES,DC=srckoa,DC=local"
$domain = "srckoa.local"
$Password = "YourP@ssw0d"

foreach ($u in $csv) {

    #Creating Organizational Unit
    try {
        New-ADOrganizationalUnit -Name $u.OU -path $path #-WhatIf
    }
    catch {
        Write-Host "OU $($u.OU) ready for receiving user accounts" -ForegroundColor Yellow
    }
    
    #Creating user account in the previous created orgnizational Unit
    New-ADUser -Name $u.DisplayName`
        -GivenName $u.GivenName`
        -Surname $u.surname`
        -SamAccountName $u.samAccountName`
        -UserPrincipalName $($u.givenName + "." + $u.surname + "@$domain")`
        -Department $u.Department`
        -DisplayName $u.DisplayName`
        -AccountPassword (ConvertTo-SecureString $Password -AsPlainText -Force)`
        -Path ("OU=" + $u.OU + "," + $path)`
        -Enabled $true `
        -ChangePasswordAtLogon $true

}

Ce script va crĂ©er les comptes utilisateurs dans les unitĂ©s d’organisations qui sont indiquĂ©es dans la colonne OU. Toutes les crĂ©ations vont se faire sous une OU racine appelĂ©e SITES que nous avons indiquĂ©e dans le script.

Une démo est disponible ici :