SlideShare uma empresa Scribd logo
1 de 41
yOS-Tour - yOS-Day ©2015. All rights reserved.
#4 – yOS-Day à Lyon le 11 décembre 2015
www.yos-tour.com
contact@yos-tour.com
@YosTour
yOS-Tour - yOS-Day ©2015. All rights reserved.
#4 – yOS-Day à Lyon le 11 décembre 2015
PowerShell pour Office 365 &
SharePoint
Geekons un peu
yOS-Tour - yOS-Day ©2015. All rights reserved.
Merci à nos sponsors
#4 – yOS-Day à Lyon le 11 décembre 2015
Et à nos soutiens
yOS-Tour - yOS-Day ©2015. All rights reserved.
Gilles POMMIER
MVP Office 365
SharePoint, Office 365
@: gilles.pommier@smartview.fr
b : www.smartview.fr
yOS-Tour - yOS-Day ©2015. All rights reserved.
Etienne BAILLY
MCT | Office 365 & SharePoint enthusiast
Fondateur de la société ISTEP
t: @etienne_bailly
b: istep.fr/blog
F: Etienne Bailly
yOS-Tour - yOS-Day ©2015. All rights reserved.
Agenda
yOS-Tour - yOS-Day ©2015. All rights reserved.
PowerShell ?
Pourquoi PowerShell pour Office 365 ?
Let’s connect to Office 365
Démos !
Office 365 API : Quel Objectif ?
Démos
PowerShell & SharePoint : Pourquoi l’utiliser ?
Démos
Agenda
yOS-Tour - yOS-Day ©2015. All rights reserved.
PowerShell ?
yOS-Tour - yOS-Day ©2015. All rights reserved.
Langage de script orienté objet - repose sur le Framework .Net
Snapins / Modules
Cmdlets / Functions
 Ex : Get-Service, Set-SPContentDatabase, …
Paramètres
 -Debug, -ErrorAction, -ErrorVariable, -Whatif, -Confirm
Alias
 dir  Get-ChildItem
 cd  Set-Location
 gcm  Get-Command
PowerShell ?
yOS-Tour - yOS-Day ©2015. All rights reserved.
Cmdlet Description Alias
Get-Help
Aide sur une commande
-example
help, man
Get-Member Retourne les propriétés, méthodes d’un objet gm
Get-Module Liste les modules chargés gmo
Get-PSSnapin Liste les « snapins » chargés gsnp
Get-Command Ou « Show-Command » montre les Cdlets du Module
gcm
shcm
Description Alias
|
Un « Pipeline » peut contenir une ou plusieurs
commandes séparées par le caractère « pipe » ( | )
$PSItem Représente l’objet courant $_
Where Ou « Where-Object » ou « ? » ?
ForEach Ou « ForEach-Object » ou « % » %
Select Définit les propriétés à récupérer
Un peu de syntaxe …
Description
Import-Csv Import CSV
Out-File Export fichier (.txt)
Out-Csv Export CSV (.csv)
yOS-Tour - yOS-Day ©2015. All rights reserved.
PowerShell – quelques exemples
# Accès au journal des événements (Event Viewer). 50 dernières connexions
# "C'est ki ki s'est connecté pour tout fracasser sur le serveur de Prod ??"
Get-EventLog -LogName Security |
Where EventID -eq 4624 |
Select -First 50
# Les fichiers supérieurs à 50 Mb (en cascade - récursif)
Get-ChildItem -Path c:temp -Recurse | Where-Object { $_.Length -gt 20MB }
# Les services Windows démarrés
Get-Service | Where { $_.Status –eq 'Running' }
# Les process IIS gourmands....
Get-Process | Where { $_.Name -like "*w3wp*" -and $_.PM –gt 300MB } | Sort PM -Descending
yOS-Tour - yOS-Day ©2015. All rights reserved.
Pourquoi PowerShell pour Office 365 ?
yOS-Tour - yOS-Day ©2015. All rights reserved.
Six raisons pour lesquelles nous vous recommandons d’utiliser Windows PowerShell pour gérer Office 365
PowerShell, Pourquoi ?
Windows PowerShellpeut
révélerdes informations«
masquées», non disponibles
dans le Centred’administration
Office 365 comporte des
fonctionnalitésque vous ne
pouvez configurer qu’àl’aide de
Windows PowerShell
Windows PowerShellexcelle à
effectuerdesopérationsen
bloc
Windows PowerShellfiltre
efficacementles données
Windows PowerShellfacilite
l’import/ exportdesdonnées
Windows PowerShellpermet
une gestion reposantsur
plusieursproduits
yOS-Tour - yOS-Day ©2015. All rights reserved.
Les différents outils pour administrer Office 365
yOS-Tour - yOS-Day ©2015. All rights reserved.
Let’s connect to Office 365 !
yOS-Tour - yOS-Day ©2015. All rights reserved.
Windows 7 ou + (Win 8, 8.1, 10, …)
Windows Server 2008 R2 ou + (Windows Server 2012, 2012 R2, 2016, …)
Microsoft .NET Framework 3.51 ou +
Microsoft Online Services Sign-in Assistant
Module Azure Active Directory pour Windows PowerShell
Prérequis – PowerShell pour Office 365
Toutes les infos pour bien démarrer avec PowerShell sur powershell.office.com
http://powershell.office.com/get-started
yOS-Tour - yOS-Day ©2015. All rights reserved.
Les univers « PowerShell » Office
365
Petite gymnastique : Un langage unique mais des modules séparés
# Exchange Online
$exchSession = New-PSSession `
–ConfigurationName Microsoft.Exchange `
-ConnectionUri https://ps.outlook.com/powershell `
-Credential $c `
-Authentication Basic `
–AllowRedirection
Import-PSSession $exchSession –AllowClobber
# SharePoint
Import-Module Microsoft.Online.Sharepoint.PowerShell
Connect-SPOService -Url https://tenant-admin.sharepoint.com/ -Credential $c
Module Azure Active Directory
(MSOnline)
# Skype for Business (aka Lync Online)
Import-Module LyncOnlineConnector
$skypeSession = New-CsOnlineSession -Credential $c
Import-PSSession $skypeSession –AllowClobber
yOS-Tour - yOS-Day ©2015. All rights reserved.
Se connecter à Office 365 avec PowerShell
##################################
# Connexion à Office 365
Import-Module MSOnline
$c = Get-Credential
Connect-MsolService –Credential $c
yOS-Tour - yOS-Day ©2015. All rights reserved.
Connexion à Exchange Online
avec PowerShell
yOS-Tour - yOS-Day ©2015. All rights reserved.
Démos
yOS-Tour - yOS-Day ©2015. All rights reserved.
Démo – Mettre en place une signature dynamique
Import-Module MSOnline
$c = Get-Credential
$session = New-PSSession –ConfigurationName Microsoft.Exchange `
-ConnectionUri https://ps.outlook.com/powershell
-Credential $c -Authentication Basic –AllowRedirection
Import-PSSession $session –AllowClobber
Set-ExecutionPolicy RemoteSigned
Connect-MsolService –Credential $c
$fichHTML = "C:DevPowerShelltempHTMLsignature_YosDaysMontPellierDYNAMIQUE.html"
# On applique la signature spécifique à tous les utilisateurs
Get-MsolUser |
ForEach {
$signHTML = (Get-Content $fichHTML) -f $_.DisplayName, $_.Title, `
$_.MobilePhone, $_.UserPrincipalName
Set-MailboxMessageConfiguration `
–Identity $_.UserPrincipalName `
-AutoAddSignature $True `
-SignatureHtml $signHTML
}
yOS-Tour - yOS-Day ©2015. All rights reserved.
Office 365 API : Quel Objectif ?
yOS-Tour - yOS-Day ©2015. All rights reserved.
Office 365 API : Présentation
yOS-Tour - yOS-Day ©2015. All rights reserved.
Office 365 API :
Fonctionnement
yOS-Tour - yOS-Day ©2015. All rights reserved.
Cohérence de l’API : Microsoft Graph
Avant
Après
https://graph.microsoft.io/
yOS-Tour - yOS-Day ©2015. All rights reserved.
Démos
yOS-Tour - yOS-Day ©2015. All rights reserved.
PowerShell & SharePoint: Pourquoi faire ?
yOS-Tour - yOS-Day ©2015. All rights reserved.
PowerShell et SharePoint : démarche pas à
pas
SPSite
SPWeb
SPList
SPListItem
yOS-Tour - yOS-Day ©2015. All rights reserved.
Référence PowerShell et O365
http://powershell.office.com
yOS-Tour - yOS-Day ©2015. All rights reserved.
Office 365 CmdLets pour SharePoint
yOS-Tour - yOS-Day ©2015. All rights reserved.
Office 365 PowerShell site creation
 Que faire maintenant ?
 Utiliser CSOM avec les Cmdlets SPO ?
 Utiliser les Cmdlets au niveau Site Collection ?
 Utiliser CSOM pour travailler au niveau Webs ?
yOS-Tour - yOS-Day ©2015. All rights reserved.
Commandes PnP-PowerShell : où les
trouver ?
https://github.com/OfficeDev/PnP-PowerShell
yOS-Tour - yOS-Day ©2015. All rights reserved.
Commandes PnP-PowerShell : Pour quoi faire?
yOS-Tour - yOS-Day ©2015. All rights reserved.
Démos
yOS-Tour - yOS-Day ©2015. All rights reserved.
Un peu de lecture…
yOS-Tour - yOS-Day ©2015. All rights reserved.
http://powershell.office.com
• Scripts d’exemple
• Scénarios utiles
• Aide
PowerShell for Office 365
yOS-Tour - yOS-Day ©2015. All rights reserved.
PowerShell Tools for Visual Studio
https://visualstudiogallery.msdn.microsoft.com/c9eb3ba8-0c59-4944-9a62-6eee37294597
yOS-Tour - yOS-Day ©2015. All rights reserved.
Office 365 Resources
yOS-Tour - yOS-Day ©2015. All rights reserved.
http://technet.microsoft.com/en-us/office/dn788774
Technet – Bible technique
yOS-Tour - yOS-Day ©2015. All rights reserved.
#4 – yOS-Day à Lyon le 11 décembre 2015
www.yos-tour.com
contact@yos-tour.com
@YosTour
merci !
yOS-Tour - yOS-Day ©2015. All rights reserved.
Questions ?

Mais conteúdo relacionado

Mais procurados

2015-08-27 Office 365 Techdays tour
2015-08-27 Office 365 Techdays tour2015-08-27 Office 365 Techdays tour
2015-08-27 Office 365 Techdays tourPatrick Guimonet
 
2014-06-27 Cumulos - Groupe Utilisateurs Office 365 - SharePoint, Yammer, Off...
2014-06-27 Cumulos - Groupe Utilisateurs Office 365 - SharePoint, Yammer, Off...2014-06-27 Cumulos - Groupe Utilisateurs Office 365 - SharePoint, Yammer, Off...
2014-06-27 Cumulos - Groupe Utilisateurs Office 365 - SharePoint, Yammer, Off...Patrick Guimonet
 
Mobilité 360° pour Office 365 - SharePoint Days Casablanca
Mobilité 360° pour Office 365 - SharePoint Days CasablancaMobilité 360° pour Office 365 - SharePoint Days Casablanca
Mobilité 360° pour Office 365 - SharePoint Days CasablancaPatrick Guimonet
 
Mon offre de service Office 365 : quelles stratégies de sécurité pour répondr...
Mon offre de service Office 365 : quelles stratégies de sécurité pour répondr...Mon offre de service Office 365 : quelles stratégies de sécurité pour répondr...
Mon offre de service Office 365 : quelles stratégies de sécurité pour répondr...Maxime Rastello
 
Présentation office 365 entreprise Workshop 17 09 14
Présentation office 365 entreprise  Workshop 17 09 14Présentation office 365 entreprise  Workshop 17 09 14
Présentation office 365 entreprise Workshop 17 09 14Groupe IDYAL
 
Collab365 - Créer des applicatifs métier sous Sharepoint, oui ! Mais comment ...
Collab365 - Créer des applicatifs métier sous Sharepoint, oui ! Mais comment ...Collab365 - Créer des applicatifs métier sous Sharepoint, oui ! Mais comment ...
Collab365 - Créer des applicatifs métier sous Sharepoint, oui ! Mais comment ...Thierry Buisson
 
SharePoint dans le Nuage toutes les options 2014-04-14
SharePoint dans le Nuage  toutes les options   2014-04-14SharePoint dans le Nuage  toutes les options   2014-04-14
SharePoint dans le Nuage toutes les options 2014-04-14Patrick Guimonet
 
Office vs Office 365 : quelles différences? [Webinaire]
Office vs Office 365 : quelles différences? [Webinaire]Office vs Office 365 : quelles différences? [Webinaire]
Office vs Office 365 : quelles différences? [Webinaire]Technologia Formation
 
Retour d’expérience sur le monitoring et la sécurisation des identités Azure
Retour d’expérience sur le monitoring et la sécurisation des identités AzureRetour d’expérience sur le monitoring et la sécurisation des identités Azure
Retour d’expérience sur le monitoring et la sécurisation des identités AzureMaxime Rastello
 
2SeeU - Plénière du Jeudi 8 Octobre
2SeeU - Plénière du Jeudi 8 Octobre2SeeU - Plénière du Jeudi 8 Octobre
2SeeU - Plénière du Jeudi 8 Octobre2SeeU
 
Exchange / Office 365 comment faire un déploiement hybride
Exchange / Office 365 comment faire un déploiement hybrideExchange / Office 365 comment faire un déploiement hybride
Exchange / Office 365 comment faire un déploiement hybrideMicrosoft Décideurs IT
 
Devenez un Expert SharePoint - Évitez les erreurs fréquentes
Devenez un Expert SharePoint - Évitez les erreurs fréquentesDevenez un Expert SharePoint - Évitez les erreurs fréquentes
Devenez un Expert SharePoint - Évitez les erreurs fréquentesGSoft
 
Automatiser le déploiement d'environnements SharePoint 2010/2013 grâce à Powe...
Automatiser le déploiement d'environnements SharePoint 2010/2013 grâce à Powe...Automatiser le déploiement d'environnements SharePoint 2010/2013 grâce à Powe...
Automatiser le déploiement d'environnements SharePoint 2010/2013 grâce à Powe...GSoft
 
Comment optimiser sa productivité avec office 365.
Comment optimiser sa productivité avec office 365.Comment optimiser sa productivité avec office 365.
Comment optimiser sa productivité avec office 365.Cyrès
 
Innover avec SharePoint 2013
Innover avec SharePoint 2013Innover avec SharePoint 2013
Innover avec SharePoint 2013GSoft
 
Modern Workplace Conference Paris 2021 - Automatisons l'administration d'Offi...
Modern Workplace Conference Paris 2021 - Automatisons l'administration d'Offi...Modern Workplace Conference Paris 2021 - Automatisons l'administration d'Offi...
Modern Workplace Conference Paris 2021 - Automatisons l'administration d'Offi...💻 Sylver SCHORGEN ☕️
 

Mais procurados (20)

2015-08-27 Office 365 Techdays tour
2015-08-27 Office 365 Techdays tour2015-08-27 Office 365 Techdays tour
2015-08-27 Office 365 Techdays tour
 
Office 365 en 10 slides
Office 365 en 10 slidesOffice 365 en 10 slides
Office 365 en 10 slides
 
2014-06-27 Cumulos - Groupe Utilisateurs Office 365 - SharePoint, Yammer, Off...
2014-06-27 Cumulos - Groupe Utilisateurs Office 365 - SharePoint, Yammer, Off...2014-06-27 Cumulos - Groupe Utilisateurs Office 365 - SharePoint, Yammer, Off...
2014-06-27 Cumulos - Groupe Utilisateurs Office 365 - SharePoint, Yammer, Off...
 
Mobilité 360° pour Office 365 - SharePoint Days Casablanca
Mobilité 360° pour Office 365 - SharePoint Days CasablancaMobilité 360° pour Office 365 - SharePoint Days Casablanca
Mobilité 360° pour Office 365 - SharePoint Days Casablanca
 
Mon offre de service Office 365 : quelles stratégies de sécurité pour répondr...
Mon offre de service Office 365 : quelles stratégies de sécurité pour répondr...Mon offre de service Office 365 : quelles stratégies de sécurité pour répondr...
Mon offre de service Office 365 : quelles stratégies de sécurité pour répondr...
 
Présentation office 365 entreprise Workshop 17 09 14
Présentation office 365 entreprise  Workshop 17 09 14Présentation office 365 entreprise  Workshop 17 09 14
Présentation office 365 entreprise Workshop 17 09 14
 
Collab365 - Créer des applicatifs métier sous Sharepoint, oui ! Mais comment ...
Collab365 - Créer des applicatifs métier sous Sharepoint, oui ! Mais comment ...Collab365 - Créer des applicatifs métier sous Sharepoint, oui ! Mais comment ...
Collab365 - Créer des applicatifs métier sous Sharepoint, oui ! Mais comment ...
 
SharePoint dans le Nuage toutes les options 2014-04-14
SharePoint dans le Nuage  toutes les options   2014-04-14SharePoint dans le Nuage  toutes les options   2014-04-14
SharePoint dans le Nuage toutes les options 2014-04-14
 
Office vs Office 365 : quelles différences? [Webinaire]
Office vs Office 365 : quelles différences? [Webinaire]Office vs Office 365 : quelles différences? [Webinaire]
Office vs Office 365 : quelles différences? [Webinaire]
 
Retour d’expérience sur le monitoring et la sécurisation des identités Azure
Retour d’expérience sur le monitoring et la sécurisation des identités AzureRetour d’expérience sur le monitoring et la sécurisation des identités Azure
Retour d’expérience sur le monitoring et la sécurisation des identités Azure
 
2SeeU - Plénière du Jeudi 8 Octobre
2SeeU - Plénière du Jeudi 8 Octobre2SeeU - Plénière du Jeudi 8 Octobre
2SeeU - Plénière du Jeudi 8 Octobre
 
Exchange / Office 365 comment faire un déploiement hybride
Exchange / Office 365 comment faire un déploiement hybrideExchange / Office 365 comment faire un déploiement hybride
Exchange / Office 365 comment faire un déploiement hybride
 
Devenez un Expert SharePoint - Évitez les erreurs fréquentes
Devenez un Expert SharePoint - Évitez les erreurs fréquentesDevenez un Expert SharePoint - Évitez les erreurs fréquentes
Devenez un Expert SharePoint - Évitez les erreurs fréquentes
 
Automatiser le déploiement d'environnements SharePoint 2010/2013 grâce à Powe...
Automatiser le déploiement d'environnements SharePoint 2010/2013 grâce à Powe...Automatiser le déploiement d'environnements SharePoint 2010/2013 grâce à Powe...
Automatiser le déploiement d'environnements SharePoint 2010/2013 grâce à Powe...
 
La GED et le Collaboratif avec Office 365
La GED et le Collaboratif avec Office 365La GED et le Collaboratif avec Office 365
La GED et le Collaboratif avec Office 365
 
Qu'est ce qu'office 365
Qu'est ce qu'office 365Qu'est ce qu'office 365
Qu'est ce qu'office 365
 
Comment optimiser sa productivité avec office 365.
Comment optimiser sa productivité avec office 365.Comment optimiser sa productivité avec office 365.
Comment optimiser sa productivité avec office 365.
 
Innover avec SharePoint 2013
Innover avec SharePoint 2013Innover avec SharePoint 2013
Innover avec SharePoint 2013
 
Présentation SharePoint 2016
Présentation SharePoint 2016Présentation SharePoint 2016
Présentation SharePoint 2016
 
Modern Workplace Conference Paris 2021 - Automatisons l'administration d'Offi...
Modern Workplace Conference Paris 2021 - Automatisons l'administration d'Offi...Modern Workplace Conference Paris 2021 - Automatisons l'administration d'Offi...
Modern Workplace Conference Paris 2021 - Automatisons l'administration d'Offi...
 

Semelhante a PowerShell pour Office 365 & SharePoint / yosTour Lyon / Gilles Pommier | Etienne Bailly

yOS Montpellier - Piloter Office 365 grâce à powershell - Les indispensables
yOS Montpellier - Piloter Office 365 grâce à powershell - Les indispensablesyOS Montpellier - Piloter Office 365 grâce à powershell - Les indispensables
yOS Montpellier - Piloter Office 365 grâce à powershell - Les indispensablesBenoit Jester
 
Piloter Office 365 grâce à PowerShell - Les indispensables - Benoit Jester - ...
Piloter Office 365 grâce à PowerShell - Les indispensables - Benoit Jester - ...Piloter Office 365 grâce à PowerShell - Les indispensables - Benoit Jester - ...
Piloter Office 365 grâce à PowerShell - Les indispensables - Benoit Jester - ...Etienne Bailly
 
Pièges dans les nuages - yOS Montréal 29 octobre 2015
Pièges dans les nuages - yOS Montréal 29 octobre 2015Pièges dans les nuages - yOS Montréal 29 octobre 2015
Pièges dans les nuages - yOS Montréal 29 octobre 2015Patrick Guimonet
 
I4 - Méthodes d'audit et d'optimisation pour votre tenant Office 365 - Joelle...
I4 - Méthodes d'audit et d'optimisation pour votre tenant Office 365 - Joelle...I4 - Méthodes d'audit et d'optimisation pour votre tenant Office 365 - Joelle...
I4 - Méthodes d'audit et d'optimisation pour votre tenant Office 365 - Joelle...SPS Paris
 
aOS Aix en provence 2018
aOS Aix en provence 2018aOS Aix en provence 2018
aOS Aix en provence 2018Joëlle Ruelle
 
Introduction à AngularJS dans un contexte Office365
Introduction à AngularJS dans un contexte Office365Introduction à AngularJS dans un contexte Office365
Introduction à AngularJS dans un contexte Office365Sébastien Levert
 
Slides deck yos-tour_vincentthavonekham_mvp_azure_the_future_of_microsoft_dat...
Slides deck yos-tour_vincentthavonekham_mvp_azure_the_future_of_microsoft_dat...Slides deck yos-tour_vincentthavonekham_mvp_azure_the_future_of_microsoft_dat...
Slides deck yos-tour_vincentthavonekham_mvp_azure_the_future_of_microsoft_dat...FactoVia
 
yOS tour de Montréal
yOS tour de MontréalyOS tour de Montréal
yOS tour de MontréalLuc Labelle
 
Osez faire le premier pas vers office 365 hybridez vous! - yOS Tour Lyon
Osez faire le premier pas vers office 365 hybridez vous! - yOS Tour LyonOsez faire le premier pas vers office 365 hybridez vous! - yOS Tour Lyon
Osez faire le premier pas vers office 365 hybridez vous! - yOS Tour LyonJoris Faure
 
Office 365 Dev PnP & PowerShell : exploitez enfin le potentiel de votre écosy...
Office 365 Dev PnP & PowerShell : exploitez enfin le potentiel de votre écosy...Office 365 Dev PnP & PowerShell : exploitez enfin le potentiel de votre écosy...
Office 365 Dev PnP & PowerShell : exploitez enfin le potentiel de votre écosy...Microsoft
 
Office 365 Dev PnP & PowerShell : exploitez enfin le potentiel de votre écosy...
Office 365 Dev PnP & PowerShell : exploitez enfin le potentiel de votre écosy...Office 365 Dev PnP & PowerShell : exploitez enfin le potentiel de votre écosy...
Office 365 Dev PnP & PowerShell : exploitez enfin le potentiel de votre écosy...Microsoft
 
2015 12-11 Plénière yOS-Lyon Office 365
2015 12-11 Plénière yOS-Lyon Office 3652015 12-11 Plénière yOS-Lyon Office 365
2015 12-11 Plénière yOS-Lyon Office 365Patrick Guimonet
 
Clubmossfrance15 Decembre2008
Clubmossfrance15 Decembre2008Clubmossfrance15 Decembre2008
Clubmossfrance15 Decembre2008UGAIA
 
SharePoint : votre portail métier d'entreprise #mstechdays 2012
SharePoint : votre portail métier d'entreprise #mstechdays 2012SharePoint : votre portail métier d'entreprise #mstechdays 2012
SharePoint : votre portail métier d'entreprise #mstechdays 2012Vincent Biret
 
Automatiser le déploiement d'environnements SharePoint 2010/2013 grâce à Powe...
Automatiser le déploiement d'environnements SharePoint 2010/2013 grâce à Powe...Automatiser le déploiement d'environnements SharePoint 2010/2013 grâce à Powe...
Automatiser le déploiement d'environnements SharePoint 2010/2013 grâce à Powe...Franck Cornu
 
Piège dans les Nuages - Version Rebuild 2015 Nantes
Piège dans les Nuages - Version Rebuild 2015 NantesPiège dans les Nuages - Version Rebuild 2015 Nantes
Piège dans les Nuages - Version Rebuild 2015 NantesPatrick Guimonet
 

Semelhante a PowerShell pour Office 365 & SharePoint / yosTour Lyon / Gilles Pommier | Etienne Bailly (20)

yOS Montpellier - Piloter Office 365 grâce à powershell - Les indispensables
yOS Montpellier - Piloter Office 365 grâce à powershell - Les indispensablesyOS Montpellier - Piloter Office 365 grâce à powershell - Les indispensables
yOS Montpellier - Piloter Office 365 grâce à powershell - Les indispensables
 
Piloter Office 365 grâce à PowerShell - Les indispensables - Benoit Jester - ...
Piloter Office 365 grâce à PowerShell - Les indispensables - Benoit Jester - ...Piloter Office 365 grâce à PowerShell - Les indispensables - Benoit Jester - ...
Piloter Office 365 grâce à PowerShell - Les indispensables - Benoit Jester - ...
 
Pièges dans les nuages - yOS Montréal 29 octobre 2015
Pièges dans les nuages - yOS Montréal 29 octobre 2015Pièges dans les nuages - yOS Montréal 29 octobre 2015
Pièges dans les nuages - yOS Montréal 29 octobre 2015
 
SPS Paris 2017
SPS Paris 2017SPS Paris 2017
SPS Paris 2017
 
I4 - Méthodes d'audit et d'optimisation pour votre tenant Office 365 - Joelle...
I4 - Méthodes d'audit et d'optimisation pour votre tenant Office 365 - Joelle...I4 - Méthodes d'audit et d'optimisation pour votre tenant Office 365 - Joelle...
I4 - Méthodes d'audit et d'optimisation pour votre tenant Office 365 - Joelle...
 
aOS Aix en provence 2018
aOS Aix en provence 2018aOS Aix en provence 2018
aOS Aix en provence 2018
 
Introduction à AngularJS dans un contexte Office365
Introduction à AngularJS dans un contexte Office365Introduction à AngularJS dans un contexte Office365
Introduction à AngularJS dans un contexte Office365
 
Slides deck yos-tour_vincentthavonekham_mvp_azure_the_future_of_microsoft_dat...
Slides deck yos-tour_vincentthavonekham_mvp_azure_the_future_of_microsoft_dat...Slides deck yos-tour_vincentthavonekham_mvp_azure_the_future_of_microsoft_dat...
Slides deck yos-tour_vincentthavonekham_mvp_azure_the_future_of_microsoft_dat...
 
yOS tour de Montréal
yOS tour de MontréalyOS tour de Montréal
yOS tour de Montréal
 
Osez faire le premier pas vers office 365 hybridez vous! - yOS Tour Lyon
Osez faire le premier pas vers office 365 hybridez vous! - yOS Tour LyonOsez faire le premier pas vers office 365 hybridez vous! - yOS Tour Lyon
Osez faire le premier pas vers office 365 hybridez vous! - yOS Tour Lyon
 
Office 365 Dev PnP & PowerShell : exploitez enfin le potentiel de votre écosy...
Office 365 Dev PnP & PowerShell : exploitez enfin le potentiel de votre écosy...Office 365 Dev PnP & PowerShell : exploitez enfin le potentiel de votre écosy...
Office 365 Dev PnP & PowerShell : exploitez enfin le potentiel de votre écosy...
 
Office 365 Dev PnP & PowerShell : exploitez enfin le potentiel de votre écosy...
Office 365 Dev PnP & PowerShell : exploitez enfin le potentiel de votre écosy...Office 365 Dev PnP & PowerShell : exploitez enfin le potentiel de votre écosy...
Office 365 Dev PnP & PowerShell : exploitez enfin le potentiel de votre écosy...
 
2015 12-11 Plénière yOS-Lyon Office 365
2015 12-11 Plénière yOS-Lyon Office 3652015 12-11 Plénière yOS-Lyon Office 365
2015 12-11 Plénière yOS-Lyon Office 365
 
Clubmossfrance15 Decembre2008
Clubmossfrance15 Decembre2008Clubmossfrance15 Decembre2008
Clubmossfrance15 Decembre2008
 
SharePoint : votre portail métier d'entreprise #mstechdays 2012
SharePoint : votre portail métier d'entreprise #mstechdays 2012SharePoint : votre portail métier d'entreprise #mstechdays 2012
SharePoint : votre portail métier d'entreprise #mstechdays 2012
 
Automatiser le déploiement d'environnements SharePoint 2010/2013 grâce à Powe...
Automatiser le déploiement d'environnements SharePoint 2010/2013 grâce à Powe...Automatiser le déploiement d'environnements SharePoint 2010/2013 grâce à Powe...
Automatiser le déploiement d'environnements SharePoint 2010/2013 grâce à Powe...
 
Powerbi 365
Powerbi 365Powerbi 365
Powerbi 365
 
Power BI 365
Power BI 365Power BI 365
Power BI 365
 
Azure Data Factory-Rebuild 2017
Azure Data Factory-Rebuild 2017 Azure Data Factory-Rebuild 2017
Azure Data Factory-Rebuild 2017
 
Piège dans les Nuages - Version Rebuild 2015 Nantes
Piège dans les Nuages - Version Rebuild 2015 NantesPiège dans les Nuages - Version Rebuild 2015 Nantes
Piège dans les Nuages - Version Rebuild 2015 Nantes
 

PowerShell pour Office 365 & SharePoint / yosTour Lyon / Gilles Pommier | Etienne Bailly

  • 1. yOS-Tour - yOS-Day ©2015. All rights reserved. #4 – yOS-Day à Lyon le 11 décembre 2015 www.yos-tour.com contact@yos-tour.com @YosTour
  • 2. yOS-Tour - yOS-Day ©2015. All rights reserved. #4 – yOS-Day à Lyon le 11 décembre 2015 PowerShell pour Office 365 & SharePoint Geekons un peu
  • 3. yOS-Tour - yOS-Day ©2015. All rights reserved. Merci à nos sponsors #4 – yOS-Day à Lyon le 11 décembre 2015 Et à nos soutiens
  • 4. yOS-Tour - yOS-Day ©2015. All rights reserved. Gilles POMMIER MVP Office 365 SharePoint, Office 365 @: gilles.pommier@smartview.fr b : www.smartview.fr
  • 5. yOS-Tour - yOS-Day ©2015. All rights reserved. Etienne BAILLY MCT | Office 365 & SharePoint enthusiast Fondateur de la société ISTEP t: @etienne_bailly b: istep.fr/blog F: Etienne Bailly
  • 6. yOS-Tour - yOS-Day ©2015. All rights reserved. Agenda
  • 7. yOS-Tour - yOS-Day ©2015. All rights reserved. PowerShell ? Pourquoi PowerShell pour Office 365 ? Let’s connect to Office 365 Démos ! Office 365 API : Quel Objectif ? Démos PowerShell & SharePoint : Pourquoi l’utiliser ? Démos Agenda
  • 8. yOS-Tour - yOS-Day ©2015. All rights reserved. PowerShell ?
  • 9. yOS-Tour - yOS-Day ©2015. All rights reserved. Langage de script orienté objet - repose sur le Framework .Net Snapins / Modules Cmdlets / Functions  Ex : Get-Service, Set-SPContentDatabase, … Paramètres  -Debug, -ErrorAction, -ErrorVariable, -Whatif, -Confirm Alias  dir  Get-ChildItem  cd  Set-Location  gcm  Get-Command PowerShell ?
  • 10. yOS-Tour - yOS-Day ©2015. All rights reserved. Cmdlet Description Alias Get-Help Aide sur une commande -example help, man Get-Member Retourne les propriétés, méthodes d’un objet gm Get-Module Liste les modules chargés gmo Get-PSSnapin Liste les « snapins » chargés gsnp Get-Command Ou « Show-Command » montre les Cdlets du Module gcm shcm Description Alias | Un « Pipeline » peut contenir une ou plusieurs commandes séparées par le caractère « pipe » ( | ) $PSItem Représente l’objet courant $_ Where Ou « Where-Object » ou « ? » ? ForEach Ou « ForEach-Object » ou « % » % Select Définit les propriétés à récupérer Un peu de syntaxe … Description Import-Csv Import CSV Out-File Export fichier (.txt) Out-Csv Export CSV (.csv)
  • 11. yOS-Tour - yOS-Day ©2015. All rights reserved. PowerShell – quelques exemples # Accès au journal des événements (Event Viewer). 50 dernières connexions # "C'est ki ki s'est connecté pour tout fracasser sur le serveur de Prod ??" Get-EventLog -LogName Security | Where EventID -eq 4624 | Select -First 50 # Les fichiers supérieurs à 50 Mb (en cascade - récursif) Get-ChildItem -Path c:temp -Recurse | Where-Object { $_.Length -gt 20MB } # Les services Windows démarrés Get-Service | Where { $_.Status –eq 'Running' } # Les process IIS gourmands.... Get-Process | Where { $_.Name -like "*w3wp*" -and $_.PM –gt 300MB } | Sort PM -Descending
  • 12. yOS-Tour - yOS-Day ©2015. All rights reserved. Pourquoi PowerShell pour Office 365 ?
  • 13. yOS-Tour - yOS-Day ©2015. All rights reserved. Six raisons pour lesquelles nous vous recommandons d’utiliser Windows PowerShell pour gérer Office 365 PowerShell, Pourquoi ? Windows PowerShellpeut révélerdes informations« masquées», non disponibles dans le Centred’administration Office 365 comporte des fonctionnalitésque vous ne pouvez configurer qu’àl’aide de Windows PowerShell Windows PowerShellexcelle à effectuerdesopérationsen bloc Windows PowerShellfiltre efficacementles données Windows PowerShellfacilite l’import/ exportdesdonnées Windows PowerShellpermet une gestion reposantsur plusieursproduits
  • 14. yOS-Tour - yOS-Day ©2015. All rights reserved. Les différents outils pour administrer Office 365
  • 15. yOS-Tour - yOS-Day ©2015. All rights reserved. Let’s connect to Office 365 !
  • 16. yOS-Tour - yOS-Day ©2015. All rights reserved. Windows 7 ou + (Win 8, 8.1, 10, …) Windows Server 2008 R2 ou + (Windows Server 2012, 2012 R2, 2016, …) Microsoft .NET Framework 3.51 ou + Microsoft Online Services Sign-in Assistant Module Azure Active Directory pour Windows PowerShell Prérequis – PowerShell pour Office 365 Toutes les infos pour bien démarrer avec PowerShell sur powershell.office.com http://powershell.office.com/get-started
  • 17. yOS-Tour - yOS-Day ©2015. All rights reserved. Les univers « PowerShell » Office 365 Petite gymnastique : Un langage unique mais des modules séparés # Exchange Online $exchSession = New-PSSession ` –ConfigurationName Microsoft.Exchange ` -ConnectionUri https://ps.outlook.com/powershell ` -Credential $c ` -Authentication Basic ` –AllowRedirection Import-PSSession $exchSession –AllowClobber # SharePoint Import-Module Microsoft.Online.Sharepoint.PowerShell Connect-SPOService -Url https://tenant-admin.sharepoint.com/ -Credential $c Module Azure Active Directory (MSOnline) # Skype for Business (aka Lync Online) Import-Module LyncOnlineConnector $skypeSession = New-CsOnlineSession -Credential $c Import-PSSession $skypeSession –AllowClobber
  • 18. yOS-Tour - yOS-Day ©2015. All rights reserved. Se connecter à Office 365 avec PowerShell ################################## # Connexion à Office 365 Import-Module MSOnline $c = Get-Credential Connect-MsolService –Credential $c
  • 19. yOS-Tour - yOS-Day ©2015. All rights reserved. Connexion à Exchange Online avec PowerShell
  • 20. yOS-Tour - yOS-Day ©2015. All rights reserved. Démos
  • 21. yOS-Tour - yOS-Day ©2015. All rights reserved. Démo – Mettre en place une signature dynamique Import-Module MSOnline $c = Get-Credential $session = New-PSSession –ConfigurationName Microsoft.Exchange ` -ConnectionUri https://ps.outlook.com/powershell -Credential $c -Authentication Basic –AllowRedirection Import-PSSession $session –AllowClobber Set-ExecutionPolicy RemoteSigned Connect-MsolService –Credential $c $fichHTML = "C:DevPowerShelltempHTMLsignature_YosDaysMontPellierDYNAMIQUE.html" # On applique la signature spécifique à tous les utilisateurs Get-MsolUser | ForEach { $signHTML = (Get-Content $fichHTML) -f $_.DisplayName, $_.Title, ` $_.MobilePhone, $_.UserPrincipalName Set-MailboxMessageConfiguration ` –Identity $_.UserPrincipalName ` -AutoAddSignature $True ` -SignatureHtml $signHTML }
  • 22. yOS-Tour - yOS-Day ©2015. All rights reserved. Office 365 API : Quel Objectif ?
  • 23. yOS-Tour - yOS-Day ©2015. All rights reserved. Office 365 API : Présentation
  • 24. yOS-Tour - yOS-Day ©2015. All rights reserved. Office 365 API : Fonctionnement
  • 25. yOS-Tour - yOS-Day ©2015. All rights reserved. Cohérence de l’API : Microsoft Graph Avant Après https://graph.microsoft.io/
  • 26. yOS-Tour - yOS-Day ©2015. All rights reserved. Démos
  • 27. yOS-Tour - yOS-Day ©2015. All rights reserved. PowerShell & SharePoint: Pourquoi faire ?
  • 28. yOS-Tour - yOS-Day ©2015. All rights reserved. PowerShell et SharePoint : démarche pas à pas SPSite SPWeb SPList SPListItem
  • 29. yOS-Tour - yOS-Day ©2015. All rights reserved. Référence PowerShell et O365 http://powershell.office.com
  • 30. yOS-Tour - yOS-Day ©2015. All rights reserved. Office 365 CmdLets pour SharePoint
  • 31. yOS-Tour - yOS-Day ©2015. All rights reserved. Office 365 PowerShell site creation  Que faire maintenant ?  Utiliser CSOM avec les Cmdlets SPO ?  Utiliser les Cmdlets au niveau Site Collection ?  Utiliser CSOM pour travailler au niveau Webs ?
  • 32. yOS-Tour - yOS-Day ©2015. All rights reserved. Commandes PnP-PowerShell : où les trouver ? https://github.com/OfficeDev/PnP-PowerShell
  • 33. yOS-Tour - yOS-Day ©2015. All rights reserved. Commandes PnP-PowerShell : Pour quoi faire?
  • 34. yOS-Tour - yOS-Day ©2015. All rights reserved. Démos
  • 35. yOS-Tour - yOS-Day ©2015. All rights reserved. Un peu de lecture…
  • 36. yOS-Tour - yOS-Day ©2015. All rights reserved. http://powershell.office.com • Scripts d’exemple • Scénarios utiles • Aide PowerShell for Office 365
  • 37. yOS-Tour - yOS-Day ©2015. All rights reserved. PowerShell Tools for Visual Studio https://visualstudiogallery.msdn.microsoft.com/c9eb3ba8-0c59-4944-9a62-6eee37294597
  • 38. yOS-Tour - yOS-Day ©2015. All rights reserved. Office 365 Resources
  • 39. yOS-Tour - yOS-Day ©2015. All rights reserved. http://technet.microsoft.com/en-us/office/dn788774 Technet – Bible technique
  • 40. yOS-Tour - yOS-Day ©2015. All rights reserved. #4 – yOS-Day à Lyon le 11 décembre 2015 www.yos-tour.com contact@yos-tour.com @YosTour merci !
  • 41. yOS-Tour - yOS-Day ©2015. All rights reserved. Questions ?