Menu

Installer les outils Exchange ExchangeOnlineManagement

Install-Module -Name ExchangeOnlineManagement
Import-Module ExchangeOnlineManagement 

Pour se connecter au tenant en powershell

Connect-ExchangeOnline -UserPrincipalName admin@mon-domaine.fr

Forcer la politique de rétention et d'archivage

Commande 1 => $Mailboxes = Get-Mailbox -ResultSize Unlimited -Filter {RecipientTypeDetails -eq "UserMailbox"}
Commande 2 => $Mailboxes.Identity | Start-ManagedFolderAssistant

Activer une BAL archive

Enable-Mailbox -Identity <username> -Archive

Désactiver une BAL archive

Disable-Mailbox -Identity <username> -Archive

Donner des droits sur un calendrier

Add-MailboxFolderPermission -Identity "nom de la ressource:\Calendrier" -User "nom de l'utilisateur" -AccessRights Editor
#Example
Add-MailboxFolderPermission -Identity "name-of-ressource:\Calendrier" -User t.user -AccessRights PublishingEditor
#Verifier les droits sur le calendrier
Get-MailboxFolderPermission -Identity "name-of-ressource:\Calendrier"
#Enlever des droits : 
Remove-MailboxFolderPermission -Identity "name-of-ressource:\Calendar" -User t.user

Lister l'usage des BALs utilisateurs

Get-Mailbox -ResultSize Unlimited | Get-MailboxStatistics | Select DisplayName, TotalItemSize, ItemCount,DeletedItemCount | Export-csv -Path C:\Users\**t.user**\Desktop\Usage_BAL.csv

Lister l'usage des BALs utilisateurs

Get-Mailbox -Identity "users"  | Get-MailboxStatistics| Select DisplayName, TotalItemSize, ItemCount,DeletedItemCount | Export-csv -Path C:\Users\**t.user**\Desktop\Usage_BAL.csv

Voir la taille de la corbeille

get-mailboxfolderstatistics -Identity "User" -FolderScope deleteditems  | Select-Object itemsinfolder, foldersize

Haut de page