Pour me suivre :

Facebook Linkedin
Twitter RSS

Microsoft Most Valuable Professional

Mes eBooks

Office365 – Astuces pour les administrateurs

Astuces Office 365 pour les administrateurs

  • Gestion

 

  • Gestion par Powershell

– prérequis :

  1. Installer Powershell
  2. Dans une fenêtre avec privilèges élevés (exécuter en tant qu’administrateur) activer l’exécution automatique : Set-ExecutionPolicy RemoteSigned
  3. Démarrer WinRM : net start winrm
  4. Vérifier l’état de WinRM : winrm get winrm/config/client/auth
  5. Si le niveau d’authentification est Basic =  false le passer à True :  winrm set winrm/config/client/auth @{Basic= »true »}

– connexion de Powershell à votre tenant :

  1. Saisie des crédentials : $LiveCred = Get-Credential
  2. Initialisation :  $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/powershell/ -Credential $LiveCred -Authentication Basic -AllowRedirection
  3. Connexion : Import-PSSession $Session

Pour se déconnecter :  Remove-PSSession $Session

Interface graphique :

Prérequis :  Microsoft Online Services Sign-In Assistant 7.0 :

When installed you can launch Windows PowerShell and perform the following steps:

Initialisation :

PS D:\Windows\system32> $cred = get-credential
Credential
PS D:\Windows\system32> Connect-MsolService -cred $cred
Liste des commandes :
PS D:\Windows\system32> Get-Command -Module msonline
Capability      Name                                               ModuleName
----------      ----                                               ----------
Cmdlet          Add-MsolGroupMember                                MSOnline
Cmdlet          Add-MsolRoleMember                                 MSOnline
Cmdlet          Confirm-MsolDomain                                 MSOnline
Cmdlet          Connect-MsolService                                MSOnline
Cmdlet          Convert-MsolDomainToFederated                      MSOnline
Cmdlet          Convert-MsolDomainToStandard                       MSOnline
Cmdlet          Convert-MsolFederatedUser                          MSOnline
Cmdlet          Get-MsolAccountSku                                 MSOnline
Cmdlet          Get-MsolCompanyInformation                         MSOnline
Cmdlet          Get-MsolContact                                    MSOnline
Cmdlet          Get-MsolDomain                                     MSOnline
Cmdlet          Get-MsolDomainFederationSettings                   MSOnline
Cmdlet          Get-MsolDomainVerificationDns                      MSOnline
Cmdlet          Get-MsolFederationProperty                         MSOnline
Cmdlet          Get-MsolGroup                                      MSOnline
Cmdlet          Get-MsolGroupMember                                MSOnline
Cmdlet          Get-MsolPartnerContract                            MSOnline
Cmdlet          Get-MsolPartnerInformation                         MSOnline
Cmdlet          Get-MsolPasswordPolicy                             MSOnline
Cmdlet          Get-MsolRole                                       MSOnline
Cmdlet          Get-MsolRoleMember                                 MSOnline
Cmdlet          Get-MsolSubscription                               MSOnline
Cmdlet          Get-MsolUser                                       MSOnline
Cmdlet          Get-MsolUserRole                                   MSOnline
Cmdlet          New-MsolDomain                                     MSOnline
Cmdlet          New-MsolFederatedDomain                            MSOnline
Cmdlet          New-MsolGroup                                      MSOnline
Cmdlet          New-MsolLicenseOptions                             MSOnline
Cmdlet          New-MsolUser                                       MSOnline
Cmdlet          Redo-MsolProvisionContact                          MSOnline
Cmdlet          Redo-MsolProvisionGroup                            MSOnline
Cmdlet          Redo-MsolProvisionUser                             MSOnline
Cmdlet          Remove-MsolContact                                 MSOnline
Cmdlet          Remove-MsolDomain                                  MSOnline
Cmdlet          Remove-MsolFederatedDomain                         MSOnline
Cmdlet          Remove-MsolGroup                                   MSOnline
Cmdlet          Remove-MsolGroupMember                             MSOnline
Cmdlet          Remove-MsolRoleMember                              MSOnline
Cmdlet          Remove-MsolUser                                    MSOnline
Cmdlet          Restore-MsolUser                                   MSOnline
Cmdlet          Set-MsolADFSContext                                MSOnline
Cmdlet          Set-MsolCompanyContactInformation                  MSOnline
Cmdlet          Set-MsolCompanySettings                            MSOnline
Cmdlet          Set-MsolDirSyncEnabled                             MSOnline
Cmdlet          Set-MsolDomain                                     MSOnline
Cmdlet          Set-MsolDomainAuthentication                       MSOnline
Cmdlet          Set-MsolDomainFederationSettings                   MSOnline
Cmdlet          Set-MsolGroup                                      MSOnline
Cmdlet          Set-MsolPartnerInformation                         MSOnline
Cmdlet          Set-MsolPasswordPolicy                             MSOnline
Cmdlet          Set-MsolUser                                       MSOnline
Cmdlet          Set-MsolUserLicense                                MSOnline
Cmdlet          Set-MsolUserPassword                               MSOnline
Cmdlet          Set-MsolUserPrincipalName                          MSOnline
Cmdlet          Update-MsolFederatedDomain                         MSOnline

– commandes utiles : cf http://onlinehelp.microsoft.com/en-us/office365-enterprises/hh125002.aspx et http://technet.microsoft.com/en-us/exchangelabshelp/dd575549

Lister les mailbox :

get-mailbox 
Get-Mailbox | Format-Table Alias,*SMTP*
get-mailbox | fl name, emailaddresses

Statistiques :

Get-MailboxStatistics –identity “laurent.gebeau”
Get-Mailbox | Get-MailboxStatistics
Get-Mailbox | Get-MailboxStatistics | Select-Object DisplayName, IsArchiveMailbox, ItemCount, TotalItemSize | Format-Table –autosize
Changer l'email primaire / le SIP  : (de kim Akers qui avait kakers@contoso.com, on ajoute kakers@contoso.net, kakers@contoso.org )
Set-Mailbox kakers@contoso.com -EmailAddresses SMTP:kim.akers@contoso.com,kakers@contoso.com,kakers@contoso.net, kakers@contoso.org
set-mailbox laurent.gebeau -emailaddress SMTP:laurent.gebeau@mtoo.onmicrosoft.com, SMTP:laurent.gebeau@photosmtoo.com, SIP:laurent.gebeau@mtoo.onmicrosoft.com
Things to consider when you change a user’s SIP addressChanging a user’s SIP address has implications. For example, existing meeting links and contacts will no longer work. Users and tenant administrators must be aware of these implications and sign off that they understand these implications.

Attention : 

If you start with the domain that you created when you signed up for Office 365 and then you decide to use a custom domain, the user’s SIP address is automatically changed. In this scenario, existing meetings are migrated. For example, the initial SIP address of a user is bob@contoso.onmicrosoft.com. When you change the domain to use the contoso.com domain, the user’s SIP address is automatically changed to bob@contoso.com. However, after this first change, any additional changes in the domain will cause meeting links to no longer work. The meeting links have to be manually created. Additionally, users have to notify existing contacts to update their contact list.

Plus de détails : http://help.outlook.com/en-us/140/cc952756.aspx

Leave a Reply