SlideShare une entreprise Scribd logo
1  sur  56
WWW.COLLAB365.EVENTSWWW.COLLAB365.EVENTS
Office 365 API & PowerShell : Le
meilleur des deux mondes!
WWW.COLLAB365.EVENTS
Qui est Sébastien Levert ?!
Montreal, Canada negotium.com MVP Office365
Développeur Web @sebastienlevert pimpthecloud.com
WWW.COLLAB365.EVENTS
Agenda
• Introduction à PowerShell dans Office 365
• Utilisation de PowerShell avec SharePoint Online
• Utilisation de PowerShell avec les APIs Office 365
• DevOps avec PowerShell dans Office 365
WWW.COLLAB365.EVENTS
Pour démarrer
• Annoncé à Ignite 2015
• http://powershell.office.com
• Plusieurs exemples, scénarios, guides, …
WWW.COLLAB365.EVENTS
J’ai besoin de quoi pour débuter ?
• Un tenant Office 365 (!)
• Des privilèges d’administration sur votre tenant Office 365
• Des privilèges d’administration sur votre machine locale
• Les modules d’administration
• Microsoft Online Services Sign-in Assistant
• Azure Active Directory Module
• SharePoint Online Module
• Skype for Business Online Module
WWW.COLLAB365.EVENTS
Se connecter à SharePoint Online
• Avec le SharePoint Online Module
• Avec les APIs clientes CSOM
• Avec les commandes PowerShell OfficeDev
• Avec les APIs REST de SharePoint
WWW.COLLAB365.EVENTS
Obtenir toutes vos
collections de sites
Démo
WWW.COLLAB365.EVENTS
Obtenir toutes vos collections de sites
Get-SPOSite
Get-SPOSite –Detailed
Get-SPOSite –Detailed –Filter { Url –like “*term*” }
WWW.COLLAB365.EVENTS
Utilisation du CSOM avec PowerShell
• Obtenir les librairies CSOM manuellement
• Charger manuellement les librairies CSOM dans votre
session PowerShell
• Assurez-vous d’avoir les plus récentes librairies
[AppDomain]::CurrentDomain.GetAssemblies() | Where-Object {
$_.FullName -like "*SharePoint*” –or $_.FullName –like “*Office*”
} | Select FullName
WWW.COLLAB365.EVENTS
Trucs & astuces
• N’utilisez pas le SharePoint Online Management Shell
• Importer les modules PowerShell SharePoint dans une
session régulière PowerShell
• Charger les librairies CSOM avant de charger le SharePoint
Online Module
• Utiliser le Cmdlet de Gary Lapointe’s Load-
CSOMProperties. Tous les jours.
WWW.COLLAB365.EVENTS
Obtenir les librairies
CSOM
Démo
WWW.COLLAB365.EVENTS
Utiliser les librairies CSOM
Import-Module C:PathPTC.O365.PowerShell.psm1
Get-ClientAssemblies –Version 16 –TargetDirectory C:assemblies
Add-ClientAssemblies –AssembliesDirectory C:assemblies
[AppDomain]::CurrentDomain.GetAssemblies() | Where-Object {
$_.FullName -like "*SharePoint*” –or $_.FullName –like “*Office*”
} | Select FullName
WWW.COLLAB365.EVENTS
Mélanger le CSOM et les Cmdlets SPO
• Il est simple de mlanger le CSOM et les Cmdlets SPO
• Utiliser les Cmdlets pour obtenir les collections de sites
• Utiliser le CSOM pour le reste
WWW.COLLAB365.EVENTS
Obtenir toutes les
collections de sites
Démo
WWW.COLLAB365.EVENTS
Obtenir tous les sites de chaque collection de sites
Import-Module C:PathPTC.O365.PowerShell.psm1
Import-Module Microsoft.Online.SharePoint.PowerShell
Connect-SPOService –Url https://tenant-admin.sharepoint.com
$credentials = Get-SharePointOnlineCredentials
Get-SPOSite | Where-Object { $_.Template –notlike “*EHS#0” } | ForEach-Object {
$context = Get-Context –Url $_.Url –Credentials $credentials
Get-Webs –Context $context | Select Url
}
WWW.COLLAB365.EVENTS
Exporter le contenu
d’une liste SharePoint
Démo
WWW.COLLAB365.EVENTS
Exporter le contenu d’une liste
SharePoint
$credentials = Get-SharePointOnlineCredentials
$context = Get-Context –Url “https://tenant.sharepoint.com” –Credentials $credentials
$web = Get-Web -Context $context
$list = Get-List –Web $web –Title “Tasks”
$items = Get-ListContent –List $list -Fields @(“ID”, “Title”, “DueDate”)
$items | Select @{ Name = “ID”; Expression = { $_[“ID”] } },
@{ Name = “Title”; Expression = { $_[“Title”] } },
@{ Name = “DueDate”; Expression = { $_[“DueDate”] } } |
Export-CSV –Path C:Tasks.csv –NoTypeInformation –Encoding UTF8
WWW.COLLAB365.EVENTS
Utilisation des PowerShell.Commands
• 123 nouveaux Cmdlets livrés par l’équipe OfficeDev PnP
• Série de Cmdlets utilisés pour exécuter du CSOM
simplement sur vos environnements Online et On-
Premises
• Utilise le OfficeDevPnP.Core framework
• Doit être installé sur votre machine
• La vraie puissance de PowerShell avec la puissance de
CSOM à la saveur PnP
WWW.COLLAB365.EVENTS
Ajouter et assigner un
thème à un site
Démo
WWW.COLLAB365.EVENTS
Ajouter et assigner un thème à un site
Connect-SPOnline –Url https://tenant.sharepoint.com
Add-SPOFile –Path C:theme.spcolor –Folder “_catalogs/theme/15”
Add-SPOFile –Path C:image.jpg –Folder “SiteAssets”
Set-SPOTheme `
–ColorPaletteUrl “/_catalogs/theme/15/theme.spcolor ” `
-BackgroundImageUrl “/SiteAssets/image.jpg”
WWW.COLLAB365.EVENTS
Utilisation de REST avec SharePoint
Online• Excellente série d’article par Gary Lapointe
• Cmdlet magique fourni  Invoke-SPORestMethod
• Facilite l’utilisation d’objets “typés” dans vos scripts
PowerShell
• Ne jamais oublier de gérer vos caractères “$”
WWW.COLLAB365.EVENTS
Requêter vos items
de listes avec OData
Démo
WWW.COLLAB365.EVENTS
Requêter vos items de listes avec OData
$url =
“https://tenant.sharepoint.com/_api/lists/GetByTitle('Tasks')/ite
ms?`$select=Id,Title,DueDate,PercentComplete&`$filter=PercentComp
lete gt 0.5”
$items = Invoke-SPORestMethod –Url $url
$items.results | Out-GridView
WWW.COLLAB365.EVENTS
Requêtes le Graph
avec les API REST
Démo
WWW.COLLAB365.EVENTS
Requêtes le Graph avec les API REST
$url =
“https://tenant.sharepoint.com/_api/search/query?Querytext=‘*’&Pr
operties='GraphQuery:ACTOR(ME)’&RowLimit=100”
$results = Invoke-SPORestMethod –Url $url
$results = Get-RestSearchResults –Results $results | Out-GridView
WWW.COLLAB365.EVENTS
APIs Office 365
• Série d’APIs livrés pour unifier les APIs des produits
• Bâtis au dessus des applications Azure Active Directory
• Utilise OAuth et les JWT pour chacun des appels
• Permet les permissions déléguées et les “App-Only”
• Permet de donner des permissions sur certaines données
• Une fois l’infrastructure en place, très simple à utiliser
WWW.COLLAB365.EVENTS
APIs Office 365 avec PowerShell
1. Créer une application Azure Active Directory
2. Créer un certificat local
3. Importer le certificat dans la configuration de votre
application Azure Active Directory
4. Utiliser le certificat avec son mot de passe dans votre
code PowerShell
5. Se connecter à l’API Office 365
6. Jouer avec vos données!
WWW.COLLAB365.EVENTS
Les bases
Démo
WWW.COLLAB365.EVENTS
Les bases
makecert -r -pe -n "CN=PowerShell Office 365 API Application" -b
1/01/2015 -e 12/31/2016 -ss my -len 2048
$keyCredentials = Get-KeyCredentialsManifest –Path
C:Certificate.cer
WWW.COLLAB365.EVENTS
Obtenir un jeton
d’accès
Démo
WWW.COLLAB365.EVENTS
Obtenir un jeton d’accès
$global:AzureADApplicationTenantId = “TENANTID”
$global:AzureADApplicationClientId = “APPLICATIONID”
$global:AzureADApplicationCertificatePath = “C:Certificate.pfx”
$global:AzureADApplicationCertificatePassword = “Passw0rd”
$exchangeResourceUri = “https://outlook.office365.com/”
$token = Get-AccessToken -ResourceUri $exchangeResourceUri
WWW.COLLAB365.EVENTS
Obtenir le contenu de
votre boîte courriel
Demo
WWW.COLLAB365.EVENTS
Obtenir le contenu de votre boîte
courriel
$url = $exchangeResourceUri + “/api/v1.0/users(‘email’)/folders/inbox/messages?$top=50"
$response = Invoke-SecuredRestMethod -Method "GET" -AccessToken $token -EndpointUri $url
$hasMore = $true
$messages = @()
while($hasMore) {
$response = Invoke-SecuredRestMethod -Method "GET" -AccessToken $token-EndpointUri $url
$response.value | ForEach-Object { $messages += $_ }
$hasMore = $response.'@odata.nextLink' -ne $null
$url = $response.'@odata.nextLink’
}
$messages | Select Subject | Out-GridView
WWW.COLLAB365.EVENTS
Envoyer un courriel
Démo
WWW.COLLAB365.EVENTS
Préparation du corps du courriel
$body = @{
“Message” = @{
“Subject” = "This is a test email from PowerShell!”
“Body” = @{ “ContentType” = “Text”; “Content” = “This email was sent from PowerShell
using the Office 365 API.” }
“ToRecipients” = @(
@{ “EmailAddress” = @{ “Address” = “slevert@sebastienlevert.com” } }
)
}
$body.SaveToSentItems = $false
}
WWW.COLLAB365.EVENTS
Envoyer un courriel
$url = $exchangeResourceUri + “/api/v1.0/users(‘email’)/sendmail”
$response = Invoke-SecuredRestMethod –Method “POST” -AccessToken $token -EndpointUri $url
–Body ($body | ConvertTo-Json $body –Depth 4)
WWW.COLLAB365.EVENTS
Ce que le DevOps signifie pour moi…
• Automatiser tout ce qui est possible
• S’assurer qu’une configuration peur être répliquée à tout
moment
• Gagner un maximum de contrôle sur vos déploiements
• Cesser d’avoir peur de ses usagers…
WWW.COLLAB365.EVENTS
Dans un monde Office 365, ça signifie…
• Chacun des artéfact qui est créé doit être scripté et
déployé automatiquement
• Usagers
• Boîtes courriel
• SharePoint
• Sites
• Colonnes
• Types de contenu
• Listes
• …
• …
WWW.COLLAB365.EVENTS
Exportation d’une
configuration de site
Démo
WWW.COLLAB365.EVENTS
Exportation d’une configuration de site
Connect-SPOnline –Url https://tenant.sharepoint.com
Get-SPOProvisioningTemplate –Out C:template.xml -
PersistComposedLookFiles
WWW.COLLAB365.EVENTS
Importation d’une
configuration de site
Démo
WWW.COLLAB365.EVENTS
Import SharePoint site configuration
Connect-SPOnline –Url https://tenant.sharepoint.com
Apply-SPOProvisioningTemplate –Path C:template.xml
WWW.COLLAB365.EVENTS
Ressources PowerShell pour Office 365
• PowerShell for Office 365
• http://powershell.office.com
• Microsoft Online Services Sign-In Assistant for IT
Professionals
• http://www.microsoft.com/en-us/download/details.aspx?id=41950
• SharePoint Online Management Shell
• http://www.microsoft.com/en-us/download/details.aspx?id=35588
• Windows PowerShell Module for Skype for Business Online
• http://www.microsoft.com/en-us/download/details.aspx?id=39366
WWW.COLLAB365.EVENTS
PowerShell for Office 365 Resources
• Azure Active Directory Module for Windows PowerShell
• http://go.microsoft.com/fwlink/p/?linkid=236298 (32-bit Version)
• http://go.microsoft.com/fwlink/p/?linkid=236297 (64-bit Version)
• OfficeDevPnP.PowerShell Commands
• https://github.com/OfficeDev/PnP/tree/master/Solutions/PowerShell.Commands
• PimpTheCloud PowerShell Office 365 Modules
• https://github.com/PimpTheCloud/PTC.O365.PowerShell
WWW.COLLAB365.EVENTS
PowerShell for Office 365 Resources
• Articles de Gary Lapointe “PowerShell and SharePoint
Online REST”
• http://www.itunity.com/article/sharepoint-rest-service-windows-powershell-1381
• http://www.itunity.com/article/custom-windows-powershell-function-sharepoint-
rest-service-calls-1985
• http://www.itunity.com/article/working-lists-list-items-sharepoint-rest-service-
windows-powershell-2077
• http://www.itunity.com/article/working-folders-files-sharepoint-rest-service-
powershell-2159
WWW.COLLAB365.EVENTS
Catch me!
Montreal, Canada negotium.com MVP Office365
Développeur Web @sebastienlevert pimpthecloud.com
Stay tuned for more great sessions …
WWW.COLLAB365.EVENTS
Thanks for watching!

Contenu connexe

En vedette

Redes sociales[1]
Redes sociales[1]Redes sociales[1]
Redes sociales[1]helizairu
 
Trabajo de informática angel turizo
Trabajo de informática angel turizoTrabajo de informática angel turizo
Trabajo de informática angel turizoangelturizo94
 
La nueva comunicación en Internet (Gerson Beltran)
 La nueva comunicación en Internet (Gerson Beltran) La nueva comunicación en Internet (Gerson Beltran)
La nueva comunicación en Internet (Gerson Beltran)Foro JuanLuisVives
 
Gauvreausectionviews
GauvreausectionviewsGauvreausectionviews
Gauvreausectionviewsgauvy1234
 
Normes comment
Normes commentNormes comment
Normes commentrazougmed
 
Copie de reglement_ombrine_d_or_2010
Copie de reglement_ombrine_d_or_2010Copie de reglement_ombrine_d_or_2010
Copie de reglement_ombrine_d_or_2010papicco01
 
Presentacion basica
Presentacion basicaPresentacion basica
Presentacion basicasurco2011
 
Bienvenidos al restaurante de
Bienvenidos al restaurante deBienvenidos al restaurante de
Bienvenidos al restaurante debgc1506
 
B1 le langage_des_sms
B1 le langage_des_smsB1 le langage_des_sms
B1 le langage_des_smshelenaaldaz
 
Resumen Compilado Gestión de Conoi
Resumen Compilado Gestión de ConoiResumen Compilado Gestión de Conoi
Resumen Compilado Gestión de ConoiJenny Berrocal
 
Masque.pdf
Masque.pdfMasque.pdf
Masque.pdfmesquetv
 
The rewinder fin mars 2013
The rewinder fin mars 2013The rewinder fin mars 2013
The rewinder fin mars 2013TheRewinder
 
Un site E-commerce en 2jrs
Un site E-commerce en 2jrsUn site E-commerce en 2jrs
Un site E-commerce en 2jrsAprentiv Conseil
 
50A vous présente L'auberge
50A vous présente L'auberge50A vous présente L'auberge
50A vous présente L'aubergeNicolas Bermond
 

En vedette (20)

Redes sociales[1]
Redes sociales[1]Redes sociales[1]
Redes sociales[1]
 
Actividad numero
Actividad numeroActividad numero
Actividad numero
 
Diffusez ses photos sur le web
Diffusez ses photos sur le webDiffusez ses photos sur le web
Diffusez ses photos sur le web
 
Trabajo de informática angel turizo
Trabajo de informática angel turizoTrabajo de informática angel turizo
Trabajo de informática angel turizo
 
La nueva comunicación en Internet (Gerson Beltran)
 La nueva comunicación en Internet (Gerson Beltran) La nueva comunicación en Internet (Gerson Beltran)
La nueva comunicación en Internet (Gerson Beltran)
 
Gauvreausectionviews
GauvreausectionviewsGauvreausectionviews
Gauvreausectionviews
 
Normes comment
Normes commentNormes comment
Normes comment
 
Info sit1 alto
Info sit1 altoInfo sit1 alto
Info sit1 alto
 
Copie de reglement_ombrine_d_or_2010
Copie de reglement_ombrine_d_or_2010Copie de reglement_ombrine_d_or_2010
Copie de reglement_ombrine_d_or_2010
 
Presentacion basica
Presentacion basicaPresentacion basica
Presentacion basica
 
Bienvenidos al restaurante de
Bienvenidos al restaurante deBienvenidos al restaurante de
Bienvenidos al restaurante de
 
Chapitre 2001
Chapitre 2001Chapitre 2001
Chapitre 2001
 
B1 le langage_des_sms
B1 le langage_des_smsB1 le langage_des_sms
B1 le langage_des_sms
 
Resumen Compilado Gestión de Conoi
Resumen Compilado Gestión de ConoiResumen Compilado Gestión de Conoi
Resumen Compilado Gestión de Conoi
 
Masque.pdf
Masque.pdfMasque.pdf
Masque.pdf
 
The rewinder fin mars 2013
The rewinder fin mars 2013The rewinder fin mars 2013
The rewinder fin mars 2013
 
Un site E-commerce en 2jrs
Un site E-commerce en 2jrsUn site E-commerce en 2jrs
Un site E-commerce en 2jrs
 
Diapositivas de cuadernia
Diapositivas de cuaderniaDiapositivas de cuadernia
Diapositivas de cuadernia
 
50A vous présente L'auberge
50A vous présente L'auberge50A vous présente L'auberge
50A vous présente L'auberge
 
Coches Veloces
Coches VelocesCoches Veloces
Coches Veloces
 

Similaire à Collab365 - Office 365 API & PowerShell : Le meilleur des deux mondes!

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
 
Votre première App SharePoint pour Office 365 avec Visual Studio !
Votre première App SharePoint pour Office 365 avec Visual Studio !Votre première App SharePoint pour Office 365 avec Visual Studio !
Votre première App SharePoint pour Office 365 avec Visual Studio !Gilles Pommier
 
Comment passer de SEO à SEO + data
Comment passer de SEO à SEO + dataComment passer de SEO à SEO + data
Comment passer de SEO à SEO + dataSEO CAMP
 
PowerShell pour Office 365 & SharePoint / yosTour Lyon / Gilles Pommier | Eti...
PowerShell pour Office 365 & SharePoint / yosTour Lyon / Gilles Pommier | Eti...PowerShell pour Office 365 & SharePoint / yosTour Lyon / Gilles Pommier | Eti...
PowerShell pour Office 365 & SharePoint / yosTour Lyon / Gilles Pommier | Eti...Etienne Bailly
 
Hands on lab Elasticsearch
Hands on lab ElasticsearchHands on lab Elasticsearch
Hands on lab ElasticsearchDavid Pilato
 
Collab365 - Gouvernance Office 365 avec PowerShell | Benoit Jester | Etienne ...
Collab365 - Gouvernance Office 365 avec PowerShell | Benoit Jester | Etienne ...Collab365 - Gouvernance Office 365 avec PowerShell | Benoit Jester | Etienne ...
Collab365 - Gouvernance Office 365 avec PowerShell | Benoit Jester | Etienne ...Etienne Bailly
 
Soutenance Zend Framework vs Symfony
Soutenance Zend Framework vs SymfonySoutenance Zend Framework vs Symfony
Soutenance Zend Framework vs SymfonyVincent Composieux
 
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
 
Softshake 2013 Apiness SA l'envers du décor
Softshake 2013 Apiness SA l'envers du décorSoftshake 2013 Apiness SA l'envers du décor
Softshake 2013 Apiness SA l'envers du décormichaelmiguel2013
 
Softshake apiness l'envers du décor
Softshake apiness l'envers du décorSoftshake apiness l'envers du décor
Softshake apiness l'envers du décorApinessSA
 
Ce que tout DBA doit savoir sur SQL Server et SharePoint 2013
Ce que tout DBA doit savoir sur SQL Server et SharePoint 2013Ce que tout DBA doit savoir sur SQL Server et SharePoint 2013
Ce que tout DBA doit savoir sur SQL Server et SharePoint 2013serge luca
 
Introduction à Sinatra
Introduction à SinatraIntroduction à Sinatra
Introduction à SinatraRémi Prévost
 
Découverte du moteur de rendu du projet Spartan
Découverte du moteur de rendu du projet SpartanDécouverte du moteur de rendu du projet Spartan
Découverte du moteur de rendu du projet SpartanMicrosoft
 
Devoxx: Tribulation d'un développeur sur le Cloud
Devoxx: Tribulation d'un développeur sur le CloudDevoxx: Tribulation d'un développeur sur le Cloud
Devoxx: Tribulation d'un développeur sur le CloudTugdual Grall
 
Web dev open door
Web dev   open doorWeb dev   open door
Web dev open doorLeTesteur
 
Formation Efficy CRM - Technical training
Formation Efficy CRM - Technical trainingFormation Efficy CRM - Technical training
Formation Efficy CRM - Technical trainingEfficy CRM
 

Similaire à Collab365 - Office 365 API & PowerShell : Le meilleur des deux mondes! (20)

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...
 
Votre première App SharePoint pour Office 365 avec Visual Studio !
Votre première App SharePoint pour Office 365 avec Visual Studio !Votre première App SharePoint pour Office 365 avec Visual Studio !
Votre première App SharePoint pour Office 365 avec Visual Studio !
 
Comment passer de SEO à SEO + data
Comment passer de SEO à SEO + dataComment passer de SEO à SEO + data
Comment passer de SEO à SEO + data
 
PowerShell pour Office 365 & SharePoint / yosTour Lyon / Gilles Pommier | Eti...
PowerShell pour Office 365 & SharePoint / yosTour Lyon / Gilles Pommier | Eti...PowerShell pour Office 365 & SharePoint / yosTour Lyon / Gilles Pommier | Eti...
PowerShell pour Office 365 & SharePoint / yosTour Lyon / Gilles Pommier | Eti...
 
Hands on lab Elasticsearch
Hands on lab ElasticsearchHands on lab Elasticsearch
Hands on lab Elasticsearch
 
Collab365 - Gouvernance Office 365 avec PowerShell | Benoit Jester | Etienne ...
Collab365 - Gouvernance Office 365 avec PowerShell | Benoit Jester | Etienne ...Collab365 - Gouvernance Office 365 avec PowerShell | Benoit Jester | Etienne ...
Collab365 - Gouvernance Office 365 avec PowerShell | Benoit Jester | Etienne ...
 
Workshop - Lightning Web Components
Workshop - Lightning Web ComponentsWorkshop - Lightning Web Components
Workshop - Lightning Web Components
 
Workshop Lightning Web Components
Workshop Lightning Web ComponentsWorkshop Lightning Web Components
Workshop Lightning Web Components
 
Soutenance Zend Framework vs Symfony
Soutenance Zend Framework vs SymfonySoutenance Zend Framework vs Symfony
Soutenance Zend Framework vs Symfony
 
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 - ...
 
Softshake 2013 Apiness SA l'envers du décor
Softshake 2013 Apiness SA l'envers du décorSoftshake 2013 Apiness SA l'envers du décor
Softshake 2013 Apiness SA l'envers du décor
 
Softshake apiness l'envers du décor
Softshake apiness l'envers du décorSoftshake apiness l'envers du décor
Softshake apiness l'envers du décor
 
Ce que tout DBA doit savoir sur SQL Server et SharePoint 2013
Ce que tout DBA doit savoir sur SQL Server et SharePoint 2013Ce que tout DBA doit savoir sur SQL Server et SharePoint 2013
Ce que tout DBA doit savoir sur SQL Server et SharePoint 2013
 
Introduction à Sinatra
Introduction à SinatraIntroduction à Sinatra
Introduction à Sinatra
 
Découverte du moteur de rendu du projet Spartan
Découverte du moteur de rendu du projet SpartanDécouverte du moteur de rendu du projet Spartan
Découverte du moteur de rendu du projet Spartan
 
Devoxx: Tribulation d'un développeur sur le Cloud
Devoxx: Tribulation d'un développeur sur le CloudDevoxx: Tribulation d'un développeur sur le Cloud
Devoxx: Tribulation d'un développeur sur le Cloud
 
22410 b 04
22410 b 0422410 b 04
22410 b 04
 
Web dev open door
Web dev   open doorWeb dev   open door
Web dev open door
 
Formation Efficy CRM - Technical training
Formation Efficy CRM - Technical trainingFormation Efficy CRM - Technical training
Formation Efficy CRM - Technical training
 

Plus de Sébastien Levert

SharePoint Fest Chicago 2019 - Build a Full Intranet in 70 minutes
SharePoint Fest Chicago 2019 - Build a Full Intranet in 70 minutesSharePoint Fest Chicago 2019 - Build a Full Intranet in 70 minutes
SharePoint Fest Chicago 2019 - Build a Full Intranet in 70 minutesSébastien Levert
 
SharePoint Fest Chicago 2019 - Building tailored search experiences in Modern...
SharePoint Fest Chicago 2019 - Building tailored search experiences in Modern...SharePoint Fest Chicago 2019 - Building tailored search experiences in Modern...
SharePoint Fest Chicago 2019 - Building tailored search experiences in Modern...Sébastien Levert
 
SharePoint Fest Chicago 2019 - From SharePoint to Office 365 Development
SharePoint Fest Chicago 2019 - From SharePoint to Office 365 DevelopmentSharePoint Fest Chicago 2019 - From SharePoint to Office 365 Development
SharePoint Fest Chicago 2019 - From SharePoint to Office 365 DevelopmentSébastien Levert
 
ESPC19 - Supercharge Your Teams Experience with Advanced Development Techniques
ESPC19 - Supercharge Your Teams Experience with Advanced Development TechniquesESPC19 - Supercharge Your Teams Experience with Advanced Development Techniques
ESPC19 - Supercharge Your Teams Experience with Advanced Development TechniquesSébastien Levert
 
ESPC19 - Build Your First Microsoft Teams App Using SPFx
ESPC19 - Build Your First Microsoft Teams App Using SPFxESPC19 - Build Your First Microsoft Teams App Using SPFx
ESPC19 - Build Your First Microsoft Teams App Using SPFxSébastien Levert
 
SharePoint Fest Seattle 2019 - From SharePoint to Office 365 Development
SharePoint Fest Seattle 2019 - From SharePoint to Office 365 DevelopmentSharePoint Fest Seattle 2019 - From SharePoint to Office 365 Development
SharePoint Fest Seattle 2019 - From SharePoint to Office 365 DevelopmentSébastien Levert
 
SharePoint Fest Seattle 2019 - Building tailored search experiences in Modern...
SharePoint Fest Seattle 2019 - Building tailored search experiences in Modern...SharePoint Fest Seattle 2019 - Building tailored search experiences in Modern...
SharePoint Fest Seattle 2019 - Building tailored search experiences in Modern...Sébastien Levert
 
SPC19 - Building tailored search experiences in Modern SharePoint
SPC19 - Building tailored search experiences in Modern SharePointSPC19 - Building tailored search experiences in Modern SharePoint
SPC19 - Building tailored search experiences in Modern SharePointSébastien Levert
 
SharePoint Fest 2019 - Build an intelligent application by connecting it to t...
SharePoint Fest 2019 - Build an intelligent application by connecting it to t...SharePoint Fest 2019 - Build an intelligent application by connecting it to t...
SharePoint Fest 2019 - Build an intelligent application by connecting it to t...Sébastien Levert
 
SharePoint Fest DC 2019 - Bot Framework and Microsoft Graph - Join The Revolu...
SharePoint Fest DC 2019 - Bot Framework and Microsoft Graph - Join The Revolu...SharePoint Fest DC 2019 - Bot Framework and Microsoft Graph - Join The Revolu...
SharePoint Fest DC 2019 - Bot Framework and Microsoft Graph - Join The Revolu...Sébastien Levert
 
SharePoint Fest DC 2019 - From SharePoint to Office 365 Development
SharePoint Fest DC 2019 - From SharePoint to Office 365 DevelopmentSharePoint Fest DC 2019 - From SharePoint to Office 365 Development
SharePoint Fest DC 2019 - From SharePoint to Office 365 DevelopmentSébastien Levert
 
Webinar - 2020-03-24 - Build your first Microsoft Teams app using SPFx
Webinar - 2020-03-24 - Build your first Microsoft Teams app using SPFxWebinar - 2020-03-24 - Build your first Microsoft Teams app using SPFx
Webinar - 2020-03-24 - Build your first Microsoft Teams app using SPFxSébastien Levert
 
SPTechCon Austin 2019 - Top 10 feature trends to make you fall in love with y...
SPTechCon Austin 2019 - Top 10 feature trends to make you fall in love with y...SPTechCon Austin 2019 - Top 10 feature trends to make you fall in love with y...
SPTechCon Austin 2019 - Top 10 feature trends to make you fall in love with y...Sébastien Levert
 
SPTechCon Austin 2019 - From SharePoint to Office 365 development
SPTechCon Austin 2019 - From SharePoint to Office 365 developmentSPTechCon Austin 2019 - From SharePoint to Office 365 development
SPTechCon Austin 2019 - From SharePoint to Office 365 developmentSébastien Levert
 
SharePoint Fest Chicago 2018 - From SharePoint to Office 365 development
SharePoint Fest Chicago 2018 - From SharePoint to Office 365 developmentSharePoint Fest Chicago 2018 - From SharePoint to Office 365 development
SharePoint Fest Chicago 2018 - From SharePoint to Office 365 developmentSébastien Levert
 
SharePoint Saturday Vienna 2018 - Top 10 feature trends to make you fall in l...
SharePoint Saturday Vienna 2018 - Top 10 feature trends to make you fall in l...SharePoint Saturday Vienna 2018 - Top 10 feature trends to make you fall in l...
SharePoint Saturday Vienna 2018 - Top 10 feature trends to make you fall in l...Sébastien Levert
 
SharePoint Saturday Vienna 2018 - Building a modern intranet in 60 minutes
SharePoint Saturday Vienna 2018 - Building a modern intranet in 60 minutesSharePoint Saturday Vienna 2018 - Building a modern intranet in 60 minutes
SharePoint Saturday Vienna 2018 - Building a modern intranet in 60 minutesSébastien Levert
 
European SharePoint Conference 2018 - Build an intelligent application by con...
European SharePoint Conference 2018 - Build an intelligent application by con...European SharePoint Conference 2018 - Build an intelligent application by con...
European SharePoint Conference 2018 - Build an intelligent application by con...Sébastien Levert
 
SharePoint Saturday Belgium 2018 - APIs, APIs everywhere!
SharePoint Saturday Belgium 2018 - APIs, APIs everywhere!SharePoint Saturday Belgium 2018 - APIs, APIs everywhere!
SharePoint Saturday Belgium 2018 - APIs, APIs everywhere!Sébastien Levert
 
Nashville SharePoint User Group 2018 - Building a modern intranet in 60 minutes
Nashville SharePoint User Group 2018 - Building a modern intranet in 60 minutesNashville SharePoint User Group 2018 - Building a modern intranet in 60 minutes
Nashville SharePoint User Group 2018 - Building a modern intranet in 60 minutesSébastien Levert
 

Plus de Sébastien Levert (20)

SharePoint Fest Chicago 2019 - Build a Full Intranet in 70 minutes
SharePoint Fest Chicago 2019 - Build a Full Intranet in 70 minutesSharePoint Fest Chicago 2019 - Build a Full Intranet in 70 minutes
SharePoint Fest Chicago 2019 - Build a Full Intranet in 70 minutes
 
SharePoint Fest Chicago 2019 - Building tailored search experiences in Modern...
SharePoint Fest Chicago 2019 - Building tailored search experiences in Modern...SharePoint Fest Chicago 2019 - Building tailored search experiences in Modern...
SharePoint Fest Chicago 2019 - Building tailored search experiences in Modern...
 
SharePoint Fest Chicago 2019 - From SharePoint to Office 365 Development
SharePoint Fest Chicago 2019 - From SharePoint to Office 365 DevelopmentSharePoint Fest Chicago 2019 - From SharePoint to Office 365 Development
SharePoint Fest Chicago 2019 - From SharePoint to Office 365 Development
 
ESPC19 - Supercharge Your Teams Experience with Advanced Development Techniques
ESPC19 - Supercharge Your Teams Experience with Advanced Development TechniquesESPC19 - Supercharge Your Teams Experience with Advanced Development Techniques
ESPC19 - Supercharge Your Teams Experience with Advanced Development Techniques
 
ESPC19 - Build Your First Microsoft Teams App Using SPFx
ESPC19 - Build Your First Microsoft Teams App Using SPFxESPC19 - Build Your First Microsoft Teams App Using SPFx
ESPC19 - Build Your First Microsoft Teams App Using SPFx
 
SharePoint Fest Seattle 2019 - From SharePoint to Office 365 Development
SharePoint Fest Seattle 2019 - From SharePoint to Office 365 DevelopmentSharePoint Fest Seattle 2019 - From SharePoint to Office 365 Development
SharePoint Fest Seattle 2019 - From SharePoint to Office 365 Development
 
SharePoint Fest Seattle 2019 - Building tailored search experiences in Modern...
SharePoint Fest Seattle 2019 - Building tailored search experiences in Modern...SharePoint Fest Seattle 2019 - Building tailored search experiences in Modern...
SharePoint Fest Seattle 2019 - Building tailored search experiences in Modern...
 
SPC19 - Building tailored search experiences in Modern SharePoint
SPC19 - Building tailored search experiences in Modern SharePointSPC19 - Building tailored search experiences in Modern SharePoint
SPC19 - Building tailored search experiences in Modern SharePoint
 
SharePoint Fest 2019 - Build an intelligent application by connecting it to t...
SharePoint Fest 2019 - Build an intelligent application by connecting it to t...SharePoint Fest 2019 - Build an intelligent application by connecting it to t...
SharePoint Fest 2019 - Build an intelligent application by connecting it to t...
 
SharePoint Fest DC 2019 - Bot Framework and Microsoft Graph - Join The Revolu...
SharePoint Fest DC 2019 - Bot Framework and Microsoft Graph - Join The Revolu...SharePoint Fest DC 2019 - Bot Framework and Microsoft Graph - Join The Revolu...
SharePoint Fest DC 2019 - Bot Framework and Microsoft Graph - Join The Revolu...
 
SharePoint Fest DC 2019 - From SharePoint to Office 365 Development
SharePoint Fest DC 2019 - From SharePoint to Office 365 DevelopmentSharePoint Fest DC 2019 - From SharePoint to Office 365 Development
SharePoint Fest DC 2019 - From SharePoint to Office 365 Development
 
Webinar - 2020-03-24 - Build your first Microsoft Teams app using SPFx
Webinar - 2020-03-24 - Build your first Microsoft Teams app using SPFxWebinar - 2020-03-24 - Build your first Microsoft Teams app using SPFx
Webinar - 2020-03-24 - Build your first Microsoft Teams app using SPFx
 
SPTechCon Austin 2019 - Top 10 feature trends to make you fall in love with y...
SPTechCon Austin 2019 - Top 10 feature trends to make you fall in love with y...SPTechCon Austin 2019 - Top 10 feature trends to make you fall in love with y...
SPTechCon Austin 2019 - Top 10 feature trends to make you fall in love with y...
 
SPTechCon Austin 2019 - From SharePoint to Office 365 development
SPTechCon Austin 2019 - From SharePoint to Office 365 developmentSPTechCon Austin 2019 - From SharePoint to Office 365 development
SPTechCon Austin 2019 - From SharePoint to Office 365 development
 
SharePoint Fest Chicago 2018 - From SharePoint to Office 365 development
SharePoint Fest Chicago 2018 - From SharePoint to Office 365 developmentSharePoint Fest Chicago 2018 - From SharePoint to Office 365 development
SharePoint Fest Chicago 2018 - From SharePoint to Office 365 development
 
SharePoint Saturday Vienna 2018 - Top 10 feature trends to make you fall in l...
SharePoint Saturday Vienna 2018 - Top 10 feature trends to make you fall in l...SharePoint Saturday Vienna 2018 - Top 10 feature trends to make you fall in l...
SharePoint Saturday Vienna 2018 - Top 10 feature trends to make you fall in l...
 
SharePoint Saturday Vienna 2018 - Building a modern intranet in 60 minutes
SharePoint Saturday Vienna 2018 - Building a modern intranet in 60 minutesSharePoint Saturday Vienna 2018 - Building a modern intranet in 60 minutes
SharePoint Saturday Vienna 2018 - Building a modern intranet in 60 minutes
 
European SharePoint Conference 2018 - Build an intelligent application by con...
European SharePoint Conference 2018 - Build an intelligent application by con...European SharePoint Conference 2018 - Build an intelligent application by con...
European SharePoint Conference 2018 - Build an intelligent application by con...
 
SharePoint Saturday Belgium 2018 - APIs, APIs everywhere!
SharePoint Saturday Belgium 2018 - APIs, APIs everywhere!SharePoint Saturday Belgium 2018 - APIs, APIs everywhere!
SharePoint Saturday Belgium 2018 - APIs, APIs everywhere!
 
Nashville SharePoint User Group 2018 - Building a modern intranet in 60 minutes
Nashville SharePoint User Group 2018 - Building a modern intranet in 60 minutesNashville SharePoint User Group 2018 - Building a modern intranet in 60 minutes
Nashville SharePoint User Group 2018 - Building a modern intranet in 60 minutes
 

Collab365 - Office 365 API & PowerShell : Le meilleur des deux mondes!

  • 1. WWW.COLLAB365.EVENTSWWW.COLLAB365.EVENTS Office 365 API & PowerShell : Le meilleur des deux mondes!
  • 2. WWW.COLLAB365.EVENTS Qui est Sébastien Levert ?! Montreal, Canada negotium.com MVP Office365 Développeur Web @sebastienlevert pimpthecloud.com
  • 3. WWW.COLLAB365.EVENTS Agenda • Introduction à PowerShell dans Office 365 • Utilisation de PowerShell avec SharePoint Online • Utilisation de PowerShell avec les APIs Office 365 • DevOps avec PowerShell dans Office 365
  • 4.
  • 5. WWW.COLLAB365.EVENTS Pour démarrer • Annoncé à Ignite 2015 • http://powershell.office.com • Plusieurs exemples, scénarios, guides, …
  • 6. WWW.COLLAB365.EVENTS J’ai besoin de quoi pour débuter ? • Un tenant Office 365 (!) • Des privilèges d’administration sur votre tenant Office 365 • Des privilèges d’administration sur votre machine locale • Les modules d’administration • Microsoft Online Services Sign-in Assistant • Azure Active Directory Module • SharePoint Online Module • Skype for Business Online Module
  • 7.
  • 8. WWW.COLLAB365.EVENTS Se connecter à SharePoint Online • Avec le SharePoint Online Module • Avec les APIs clientes CSOM • Avec les commandes PowerShell OfficeDev • Avec les APIs REST de SharePoint
  • 9.
  • 11. WWW.COLLAB365.EVENTS Obtenir toutes vos collections de sites Get-SPOSite Get-SPOSite –Detailed Get-SPOSite –Detailed –Filter { Url –like “*term*” }
  • 12.
  • 13. WWW.COLLAB365.EVENTS Utilisation du CSOM avec PowerShell • Obtenir les librairies CSOM manuellement • Charger manuellement les librairies CSOM dans votre session PowerShell • Assurez-vous d’avoir les plus récentes librairies [AppDomain]::CurrentDomain.GetAssemblies() | Where-Object { $_.FullName -like "*SharePoint*” –or $_.FullName –like “*Office*” } | Select FullName
  • 14. WWW.COLLAB365.EVENTS Trucs & astuces • N’utilisez pas le SharePoint Online Management Shell • Importer les modules PowerShell SharePoint dans une session régulière PowerShell • Charger les librairies CSOM avant de charger le SharePoint Online Module • Utiliser le Cmdlet de Gary Lapointe’s Load- CSOMProperties. Tous les jours.
  • 16. WWW.COLLAB365.EVENTS Utiliser les librairies CSOM Import-Module C:PathPTC.O365.PowerShell.psm1 Get-ClientAssemblies –Version 16 –TargetDirectory C:assemblies Add-ClientAssemblies –AssembliesDirectory C:assemblies [AppDomain]::CurrentDomain.GetAssemblies() | Where-Object { $_.FullName -like "*SharePoint*” –or $_.FullName –like “*Office*” } | Select FullName
  • 17. WWW.COLLAB365.EVENTS Mélanger le CSOM et les Cmdlets SPO • Il est simple de mlanger le CSOM et les Cmdlets SPO • Utiliser les Cmdlets pour obtenir les collections de sites • Utiliser le CSOM pour le reste
  • 19. WWW.COLLAB365.EVENTS Obtenir tous les sites de chaque collection de sites Import-Module C:PathPTC.O365.PowerShell.psm1 Import-Module Microsoft.Online.SharePoint.PowerShell Connect-SPOService –Url https://tenant-admin.sharepoint.com $credentials = Get-SharePointOnlineCredentials Get-SPOSite | Where-Object { $_.Template –notlike “*EHS#0” } | ForEach-Object { $context = Get-Context –Url $_.Url –Credentials $credentials Get-Webs –Context $context | Select Url }
  • 21. WWW.COLLAB365.EVENTS Exporter le contenu d’une liste SharePoint $credentials = Get-SharePointOnlineCredentials $context = Get-Context –Url “https://tenant.sharepoint.com” –Credentials $credentials $web = Get-Web -Context $context $list = Get-List –Web $web –Title “Tasks” $items = Get-ListContent –List $list -Fields @(“ID”, “Title”, “DueDate”) $items | Select @{ Name = “ID”; Expression = { $_[“ID”] } }, @{ Name = “Title”; Expression = { $_[“Title”] } }, @{ Name = “DueDate”; Expression = { $_[“DueDate”] } } | Export-CSV –Path C:Tasks.csv –NoTypeInformation –Encoding UTF8
  • 22.
  • 23. WWW.COLLAB365.EVENTS Utilisation des PowerShell.Commands • 123 nouveaux Cmdlets livrés par l’équipe OfficeDev PnP • Série de Cmdlets utilisés pour exécuter du CSOM simplement sur vos environnements Online et On- Premises • Utilise le OfficeDevPnP.Core framework • Doit être installé sur votre machine • La vraie puissance de PowerShell avec la puissance de CSOM à la saveur PnP
  • 24. WWW.COLLAB365.EVENTS Ajouter et assigner un thème à un site Démo
  • 25. WWW.COLLAB365.EVENTS Ajouter et assigner un thème à un site Connect-SPOnline –Url https://tenant.sharepoint.com Add-SPOFile –Path C:theme.spcolor –Folder “_catalogs/theme/15” Add-SPOFile –Path C:image.jpg –Folder “SiteAssets” Set-SPOTheme ` –ColorPaletteUrl “/_catalogs/theme/15/theme.spcolor ” ` -BackgroundImageUrl “/SiteAssets/image.jpg”
  • 26.
  • 27. WWW.COLLAB365.EVENTS Utilisation de REST avec SharePoint Online• Excellente série d’article par Gary Lapointe • Cmdlet magique fourni  Invoke-SPORestMethod • Facilite l’utilisation d’objets “typés” dans vos scripts PowerShell • Ne jamais oublier de gérer vos caractères “$”
  • 29. WWW.COLLAB365.EVENTS Requêter vos items de listes avec OData $url = “https://tenant.sharepoint.com/_api/lists/GetByTitle('Tasks')/ite ms?`$select=Id,Title,DueDate,PercentComplete&`$filter=PercentComp lete gt 0.5” $items = Invoke-SPORestMethod –Url $url $items.results | Out-GridView
  • 31. WWW.COLLAB365.EVENTS Requêtes le Graph avec les API REST $url = “https://tenant.sharepoint.com/_api/search/query?Querytext=‘*’&Pr operties='GraphQuery:ACTOR(ME)’&RowLimit=100” $results = Invoke-SPORestMethod –Url $url $results = Get-RestSearchResults –Results $results | Out-GridView
  • 32.
  • 33. WWW.COLLAB365.EVENTS APIs Office 365 • Série d’APIs livrés pour unifier les APIs des produits • Bâtis au dessus des applications Azure Active Directory • Utilise OAuth et les JWT pour chacun des appels • Permet les permissions déléguées et les “App-Only” • Permet de donner des permissions sur certaines données • Une fois l’infrastructure en place, très simple à utiliser
  • 34. WWW.COLLAB365.EVENTS APIs Office 365 avec PowerShell 1. Créer une application Azure Active Directory 2. Créer un certificat local 3. Importer le certificat dans la configuration de votre application Azure Active Directory 4. Utiliser le certificat avec son mot de passe dans votre code PowerShell 5. Se connecter à l’API Office 365 6. Jouer avec vos données!
  • 36. WWW.COLLAB365.EVENTS Les bases makecert -r -pe -n "CN=PowerShell Office 365 API Application" -b 1/01/2015 -e 12/31/2016 -ss my -len 2048 $keyCredentials = Get-KeyCredentialsManifest –Path C:Certificate.cer
  • 38. WWW.COLLAB365.EVENTS Obtenir un jeton d’accès $global:AzureADApplicationTenantId = “TENANTID” $global:AzureADApplicationClientId = “APPLICATIONID” $global:AzureADApplicationCertificatePath = “C:Certificate.pfx” $global:AzureADApplicationCertificatePassword = “Passw0rd” $exchangeResourceUri = “https://outlook.office365.com/” $token = Get-AccessToken -ResourceUri $exchangeResourceUri
  • 39. WWW.COLLAB365.EVENTS Obtenir le contenu de votre boîte courriel Demo
  • 40. WWW.COLLAB365.EVENTS Obtenir le contenu de votre boîte courriel $url = $exchangeResourceUri + “/api/v1.0/users(‘email’)/folders/inbox/messages?$top=50" $response = Invoke-SecuredRestMethod -Method "GET" -AccessToken $token -EndpointUri $url $hasMore = $true $messages = @() while($hasMore) { $response = Invoke-SecuredRestMethod -Method "GET" -AccessToken $token-EndpointUri $url $response.value | ForEach-Object { $messages += $_ } $hasMore = $response.'@odata.nextLink' -ne $null $url = $response.'@odata.nextLink’ } $messages | Select Subject | Out-GridView
  • 42. WWW.COLLAB365.EVENTS Préparation du corps du courriel $body = @{ “Message” = @{ “Subject” = "This is a test email from PowerShell!” “Body” = @{ “ContentType” = “Text”; “Content” = “This email was sent from PowerShell using the Office 365 API.” } “ToRecipients” = @( @{ “EmailAddress” = @{ “Address” = “slevert@sebastienlevert.com” } } ) } $body.SaveToSentItems = $false }
  • 43. WWW.COLLAB365.EVENTS Envoyer un courriel $url = $exchangeResourceUri + “/api/v1.0/users(‘email’)/sendmail” $response = Invoke-SecuredRestMethod –Method “POST” -AccessToken $token -EndpointUri $url –Body ($body | ConvertTo-Json $body –Depth 4)
  • 44.
  • 45. WWW.COLLAB365.EVENTS Ce que le DevOps signifie pour moi… • Automatiser tout ce qui est possible • S’assurer qu’une configuration peur être répliquée à tout moment • Gagner un maximum de contrôle sur vos déploiements • Cesser d’avoir peur de ses usagers…
  • 46. WWW.COLLAB365.EVENTS Dans un monde Office 365, ça signifie… • Chacun des artéfact qui est créé doit être scripté et déployé automatiquement • Usagers • Boîtes courriel • SharePoint • Sites • Colonnes • Types de contenu • Listes • … • …
  • 48. WWW.COLLAB365.EVENTS Exportation d’une configuration de site Connect-SPOnline –Url https://tenant.sharepoint.com Get-SPOProvisioningTemplate –Out C:template.xml - PersistComposedLookFiles
  • 50. WWW.COLLAB365.EVENTS Import SharePoint site configuration Connect-SPOnline –Url https://tenant.sharepoint.com Apply-SPOProvisioningTemplate –Path C:template.xml
  • 51.
  • 52. WWW.COLLAB365.EVENTS Ressources PowerShell pour Office 365 • PowerShell for Office 365 • http://powershell.office.com • Microsoft Online Services Sign-In Assistant for IT Professionals • http://www.microsoft.com/en-us/download/details.aspx?id=41950 • SharePoint Online Management Shell • http://www.microsoft.com/en-us/download/details.aspx?id=35588 • Windows PowerShell Module for Skype for Business Online • http://www.microsoft.com/en-us/download/details.aspx?id=39366
  • 53. WWW.COLLAB365.EVENTS PowerShell for Office 365 Resources • Azure Active Directory Module for Windows PowerShell • http://go.microsoft.com/fwlink/p/?linkid=236298 (32-bit Version) • http://go.microsoft.com/fwlink/p/?linkid=236297 (64-bit Version) • OfficeDevPnP.PowerShell Commands • https://github.com/OfficeDev/PnP/tree/master/Solutions/PowerShell.Commands • PimpTheCloud PowerShell Office 365 Modules • https://github.com/PimpTheCloud/PTC.O365.PowerShell
  • 54. WWW.COLLAB365.EVENTS PowerShell for Office 365 Resources • Articles de Gary Lapointe “PowerShell and SharePoint Online REST” • http://www.itunity.com/article/sharepoint-rest-service-windows-powershell-1381 • http://www.itunity.com/article/custom-windows-powershell-function-sharepoint- rest-service-calls-1985 • http://www.itunity.com/article/working-lists-list-items-sharepoint-rest-service- windows-powershell-2077 • http://www.itunity.com/article/working-folders-files-sharepoint-rest-service- powershell-2159
  • 55. WWW.COLLAB365.EVENTS Catch me! Montreal, Canada negotium.com MVP Office365 Développeur Web @sebastienlevert pimpthecloud.com
  • 56. Stay tuned for more great sessions … WWW.COLLAB365.EVENTS Thanks for watching!