SlideShare a Scribd company logo
Mastering Office 365 with
PowerShell
TechDays 2020
Matti Paukkonen
Modern Workplace Architect
+ 10 years with Microsoft technologies & SharePoint & PowerShell
+ 7 years with cloud
#TeamsFi co-organizer
https://www.linkedin.com/in/matti-paukkonen/
@mpaukkon
https://mattipaukkonen.com
https://github.com/mpaukkon/
Topics
Overview of different PowerShell modules
Demos & examples from the field
Why?
• I ❤ PowerShell!
• There are admins who are not familiar with it
• Admin centers are not including all features
• Automation & repetitive tasks
• Bulk operations
• Reusability
• Custom reports
• Community
PowerShell modules for Office 365
• When to use what?
• Different connection methods
• Versioning
• Authentication methods
• MFA support
• App Keys & Secret
• Certificate
Exchange Online PowerShell
SPO Management Shell
PnP PowerShell
Skype Online Connector
Teams PowerShell
Azure AD
Azure AD PowerShell modules
USERS GROUPS DIRECTORY LICENCES
Azure AD PowerShell modules
• Three different modules
• Azure AD PowerShell for Graph → GA and Preview version
Get-AzureADUser
• Microsoft Azure AD Module for Windows PowerShell
Get-MSolUser
• AzureAD module preferred
• Azure AD Preview version required for some management
tasks
• Unified Group Setting
• Usage Guidelines
• Group creation
Common tasks for Azure AD
• Setting Office 365 Group (Unified Group)
settings and group creation
• Assigning licenses to users
• Enable sensitivity labels for Teams, Groups &
SharePoint
• Reporting
• Used quite often with other modules
Exchange Online PowerShell
• Uses remote session (WinRM)
• Connection URLs on Docs
• MFA support→ download
module from EXO Admin
Center → Edge, IE needed
edge://flags/#edge-click-once
• Connect-EXOPSSSession with
UPN
Exchange Online PowerShell V2
• Uses modern authentication
• New cmdlets for for bulk
operations
• Properties, PropertySets,
ResultSizes
• Install/Update from
PowerShell Gallery
• Support for PowerShell Core
and cross-platform in
progress
Office 365 Security & Compliance
PowerShell
• MFA supported module from EXO Admin Center
→ Connect-IPPSSession with UPN
• Management of AIP, DLP, retention, compliance
policies, audit logs
• Synchronization of sensitivity labels for Preview
Execute-AzureAdLabelSync
SharePoint Online Management Shell
SHAREPOINT
ONLINE SETTINGS
USERS &
PERMISSIONS
SITES & SITE
COLLECTIONS
THEMES &
DESIGNS
SharePoint Online Management Shell
• Example: New-SPOSite
• Connection with Admin URL →
https://<yourtenant>-admin.sharepoint.com
• Requires SharePoint Administrator role
• Updates almost monthly
→ update when you need new features!
• Install/updates from PowerShell Gallery
Common tasks with SPO Management
Shell
• Setting up organization assets
• Managing Site Designs and Scripts
• Setting up SharePoint Home site
• Setting up company theme
• Reports
SharePoint PnP PowerShell
PROVISIONING CONTENT PROFILES METADATA
SharePoint PnP PowerShell
• Community-driven – SharePoint Patterns & Practises (PnP)
• Support SharePoint Online (and on-premises)→ separate
modules
• Utilizes SharePoint CSOM for operations
• Utilizes PnP templating mechanism for provisioning sites and
content
• Permissions on a level of the context
→ site collection, site, list…
• Install/Update from PowerShell Gallery
Common tasks with PnP PowerShell
• Provisioning new site collections with content and metadata
• Complex provisioning solutions
• Bulk operations
• Updating SharePoint User Profiles
Trick! PnP PowerShell & Graph API
• You can use PnP PowerShell to get Graph API authentication
token (delegated)
• Connect-PnPOnline –Scopes “Group.ReadWrite.All”
• $token = Get-PnPAccessToken
• $authHeader = @{
'Content-Type'='applicationjson’
'Authorization’=‘Bearer ‘+$token }
Skype for Business Online Connector
• Required for, even if TeamsOnly
• Management of different Teams policies
• Reporting user-assigned policies
• Assigning policies to groups
• Combined with/in Teams PowerShell in the future
Teams PowerShell module
• Create and manage teams
• Channels
• Tabs
• Users
• Team settings (on Preview)
• Archiving
• Apps
• Permission required on team
level or Teams Service admin
equivalent
• New Policy management
cmdlets on limited Preview
• Policy packages
• User policies
• Policy assignment to groups
Common tasks with Teams PowerShell
• Provisioning Teams
• Adding Apps to Teams
• Some migration cases, where conversation are not meaningful
• Reports
BONUS: New Graph PowerShell SDK
Preview
• Collection of modules for calling Microsoft Graph API
• Running on PowerShell Core
• Open-source
• Available on PowerShell Gallery
Examples!
Wrap-up
• PowerShell is not scary! You need to learn it
• Keep your scripts simple and reusable
• Build your script library
• docs.microsoft.com is your friend!
• #SharingIsCaring – share your knowledge &
examples
Useful resources & links
• Getting started with Office 365 PowerShell: https://docs.microsoft.com/en-
us/office365/enterprise/powershell/getting-started-with-office-365-powershell
• AzureAD PowerShell: https://docs.microsoft.com/en-us/powershell/azure/active-
directory/install-adv2?view=azureadps-2.0
• Exchange PowerShell: https://docs.microsoft.com/en-us/powershell/exchange/?view=exchange-
ps
• SPO Management Shell: https://docs.microsoft.com/en-us/powershell/sharepoint/sharepoint-
online/connect-sharepoint-online?view=sharepoint-ps
• PnP PowerShell: https://docs.microsoft.com/en-us/powershell/sharepoint/sharepoint-
pnp/sharepoint-pnp-cmdlets?view=sharepoint-ps
• Teams PowerShell: https://docs.microsoft.com/en-us/MicrosoftTeams/teams-powershell-
overview
• Microsoft Docs, PowerShell: https://docs.microsoft.com/en-us/powershell/
• Microsoft Tech Community, PowerShell:
https://techcommunity.microsoft.com/t5/powershell/ct-p/WindowsPowerShell
Teams Community Finland
Next online meeting 9.3.2020 klo 15
https://www.meetup.com/spugfi/events/266721690/
Jari Tuisku (Microsoft)
Milla Järvi
#TeamsFi | #MSTeamsDev | #SharingIsCaring
THANK YOU!

More Related Content

PPTX
Microsoft Azure
PDF
June 2021 Microsoft 365 Need to Know Webinar
PDF
March 2021 Microsoft 365 Need to Know Webinar
PDF
November 2021 Microsoft 365 Need to Know Webinar
PDF
CIAOPS Need to Know Azure Webinar - February 2018
PDF
November 2020 Microsoft 365 Need to Know Webinar
PDF
CIAOPS Need to Know Webinar - June 2017
PDF
December 2020 Microsoft 365 Need to Know Webinar
Microsoft Azure
June 2021 Microsoft 365 Need to Know Webinar
March 2021 Microsoft 365 Need to Know Webinar
November 2021 Microsoft 365 Need to Know Webinar
CIAOPS Need to Know Azure Webinar - February 2018
November 2020 Microsoft 365 Need to Know Webinar
CIAOPS Need to Know Webinar - June 2017
December 2020 Microsoft 365 Need to Know Webinar

What's hot (19)

PDF
January 2021 Microsoft 365 Need to Know Webinar
PDF
February 2021 Microsoft 365 Need to Know Webinar
PDF
Patron Power Platform Community November 2021 Webinar
PDF
April 2021 Microsoft 365 Need to Know Webinar
PDF
CIAOPS Need to Know Office 365 Webinar - March 2018
PDF
March 2020 Microsoft 365 Need to Know Webinar
PDF
CIAOPS Need to Know Webinar - July 2017
PDF
October 2019 Microsoft 365 Need to Know Webinar
PDF
September 2019 Microsoft 365 Need to Know Webinar
PDF
CIAOPS Need to Know Office 365 Webinar - April 2018
PDF
September 2020 Microsoft 365 Need to Know Webinar
PDF
Need to Know Webinar - August 2017
PDF
October 2020 Microsoft 365 Need to Know Webinar
PDF
Need to Know Webinar - September 2017
PDF
January 2020 Microsoft 365 Need to Know Webinar
PDF
O365Con18 - Best Practice with Company Video on Microsoft Stream - Michael Greth
PDF
Need to Know Office 365 webinar - July 2019
PPTX
David Schneider: Sort your (child's) Legos with Cognitive Services
PPTX
How to Win #BestMicrosoftHack with Azure
January 2021 Microsoft 365 Need to Know Webinar
February 2021 Microsoft 365 Need to Know Webinar
Patron Power Platform Community November 2021 Webinar
April 2021 Microsoft 365 Need to Know Webinar
CIAOPS Need to Know Office 365 Webinar - March 2018
March 2020 Microsoft 365 Need to Know Webinar
CIAOPS Need to Know Webinar - July 2017
October 2019 Microsoft 365 Need to Know Webinar
September 2019 Microsoft 365 Need to Know Webinar
CIAOPS Need to Know Office 365 Webinar - April 2018
September 2020 Microsoft 365 Need to Know Webinar
Need to Know Webinar - August 2017
October 2020 Microsoft 365 Need to Know Webinar
Need to Know Webinar - September 2017
January 2020 Microsoft 365 Need to Know Webinar
O365Con18 - Best Practice with Company Video on Microsoft Stream - Michael Greth
Need to Know Office 365 webinar - July 2019
David Schneider: Sort your (child's) Legos with Cognitive Services
How to Win #BestMicrosoftHack with Azure
Ad

Similar to Mastering Office 365 with PowerShell - TechDays Finland 2020 (20)

PDF
Gilles Pommier: Edit DevOps with PowerShell for Office 365 and SharePoint Onl...
PPTX
SPS Warsaw 2017
PPTX
Webinar - Office 365 & PowerShell : A Match Made in Heaven
PPTX
SharePoint Saturday Ottawa 2015 - Office 365 and PowerShell - A match made in...
PPTX
PowerShell Basics for Office Apps and Servers
PPTX
SPugPt Meeting 35: Manage govern and drive adoption of share point online wit...
PPTX
Office365 user admin_w_powershell
PDF
Collab365: PowerShell for Office 365
PDF
Managing Exchange Online using PowerShell, Tips & Tricks
PPTX
PowerShell + SharePoint Online - An Admin's Guide
PDF
O365Engage17 - Managing exchange online using power shell, tips &amp; tricks
PDF
O365Engage17 - Mastering power shell with office 365
PPTX
Getting Started with PowerShell for Office 365
PPTX
How to do everything with PowerShell
PDF
O365Engage17 - Managing share point online end to-end with powershell
PPTX
Using PowerShell for SharePoint 2013
PPTX
Office 365 & PowerShell - A match made in heaven
PDF
PowerShell Introduction to Administering SharePoint On-Premises & O365
PDF
A beginners guide to administering office 365 with power shell antonio maio
PPTX
Microsoft_Graph-Powershell_Presentation.pptx
Gilles Pommier: Edit DevOps with PowerShell for Office 365 and SharePoint Onl...
SPS Warsaw 2017
Webinar - Office 365 & PowerShell : A Match Made in Heaven
SharePoint Saturday Ottawa 2015 - Office 365 and PowerShell - A match made in...
PowerShell Basics for Office Apps and Servers
SPugPt Meeting 35: Manage govern and drive adoption of share point online wit...
Office365 user admin_w_powershell
Collab365: PowerShell for Office 365
Managing Exchange Online using PowerShell, Tips & Tricks
PowerShell + SharePoint Online - An Admin's Guide
O365Engage17 - Managing exchange online using power shell, tips &amp; tricks
O365Engage17 - Mastering power shell with office 365
Getting Started with PowerShell for Office 365
How to do everything with PowerShell
O365Engage17 - Managing share point online end to-end with powershell
Using PowerShell for SharePoint 2013
Office 365 & PowerShell - A match made in heaven
PowerShell Introduction to Administering SharePoint On-Premises & O365
A beginners guide to administering office 365 with power shell antonio maio
Microsoft_Graph-Powershell_Presentation.pptx
Ad

Recently uploaded (20)

PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
PDF
Empathic Computing: Creating Shared Understanding
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
KodekX | Application Modernization Development
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Machine learning based COVID-19 study performance prediction
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PPTX
A Presentation on Artificial Intelligence
PDF
cuic standard and advanced reporting.pdf
PDF
Electronic commerce courselecture one. Pdf
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
Empathic Computing: Creating Shared Understanding
NewMind AI Weekly Chronicles - August'25 Week I
20250228 LYD VKU AI Blended-Learning.pptx
Per capita expenditure prediction using model stacking based on satellite ima...
KodekX | Application Modernization Development
Mobile App Security Testing_ A Comprehensive Guide.pdf
Machine learning based COVID-19 study performance prediction
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
A Presentation on Artificial Intelligence
cuic standard and advanced reporting.pdf
Electronic commerce courselecture one. Pdf
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
Review of recent advances in non-invasive hemoglobin estimation
The Rise and Fall of 3GPP – Time for a Sabbatical?
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
Encapsulation_ Review paper, used for researhc scholars
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx

Mastering Office 365 with PowerShell - TechDays Finland 2020

  • 1. Mastering Office 365 with PowerShell TechDays 2020
  • 2. Matti Paukkonen Modern Workplace Architect + 10 years with Microsoft technologies & SharePoint & PowerShell + 7 years with cloud #TeamsFi co-organizer https://www.linkedin.com/in/matti-paukkonen/ @mpaukkon https://mattipaukkonen.com https://github.com/mpaukkon/
  • 3. Topics Overview of different PowerShell modules Demos & examples from the field
  • 4. Why? • I ❤ PowerShell! • There are admins who are not familiar with it • Admin centers are not including all features • Automation & repetitive tasks • Bulk operations • Reusability • Custom reports • Community
  • 5. PowerShell modules for Office 365 • When to use what? • Different connection methods • Versioning • Authentication methods • MFA support • App Keys & Secret • Certificate Exchange Online PowerShell SPO Management Shell PnP PowerShell Skype Online Connector Teams PowerShell Azure AD
  • 6. Azure AD PowerShell modules USERS GROUPS DIRECTORY LICENCES
  • 7. Azure AD PowerShell modules • Three different modules • Azure AD PowerShell for Graph → GA and Preview version Get-AzureADUser • Microsoft Azure AD Module for Windows PowerShell Get-MSolUser • AzureAD module preferred • Azure AD Preview version required for some management tasks • Unified Group Setting • Usage Guidelines • Group creation
  • 8. Common tasks for Azure AD • Setting Office 365 Group (Unified Group) settings and group creation • Assigning licenses to users • Enable sensitivity labels for Teams, Groups & SharePoint • Reporting • Used quite often with other modules
  • 9. Exchange Online PowerShell • Uses remote session (WinRM) • Connection URLs on Docs • MFA support→ download module from EXO Admin Center → Edge, IE needed edge://flags/#edge-click-once • Connect-EXOPSSSession with UPN
  • 10. Exchange Online PowerShell V2 • Uses modern authentication • New cmdlets for for bulk operations • Properties, PropertySets, ResultSizes • Install/Update from PowerShell Gallery • Support for PowerShell Core and cross-platform in progress
  • 11. Office 365 Security & Compliance PowerShell • MFA supported module from EXO Admin Center → Connect-IPPSSession with UPN • Management of AIP, DLP, retention, compliance policies, audit logs • Synchronization of sensitivity labels for Preview Execute-AzureAdLabelSync
  • 12. SharePoint Online Management Shell SHAREPOINT ONLINE SETTINGS USERS & PERMISSIONS SITES & SITE COLLECTIONS THEMES & DESIGNS
  • 13. SharePoint Online Management Shell • Example: New-SPOSite • Connection with Admin URL → https://<yourtenant>-admin.sharepoint.com • Requires SharePoint Administrator role • Updates almost monthly → update when you need new features! • Install/updates from PowerShell Gallery
  • 14. Common tasks with SPO Management Shell • Setting up organization assets • Managing Site Designs and Scripts • Setting up SharePoint Home site • Setting up company theme • Reports
  • 15. SharePoint PnP PowerShell PROVISIONING CONTENT PROFILES METADATA
  • 16. SharePoint PnP PowerShell • Community-driven – SharePoint Patterns & Practises (PnP) • Support SharePoint Online (and on-premises)→ separate modules • Utilizes SharePoint CSOM for operations • Utilizes PnP templating mechanism for provisioning sites and content • Permissions on a level of the context → site collection, site, list… • Install/Update from PowerShell Gallery
  • 17. Common tasks with PnP PowerShell • Provisioning new site collections with content and metadata • Complex provisioning solutions • Bulk operations • Updating SharePoint User Profiles
  • 18. Trick! PnP PowerShell & Graph API • You can use PnP PowerShell to get Graph API authentication token (delegated) • Connect-PnPOnline –Scopes “Group.ReadWrite.All” • $token = Get-PnPAccessToken • $authHeader = @{ 'Content-Type'='applicationjson’ 'Authorization’=‘Bearer ‘+$token }
  • 19. Skype for Business Online Connector • Required for, even if TeamsOnly • Management of different Teams policies • Reporting user-assigned policies • Assigning policies to groups • Combined with/in Teams PowerShell in the future
  • 20. Teams PowerShell module • Create and manage teams • Channels • Tabs • Users • Team settings (on Preview) • Archiving • Apps • Permission required on team level or Teams Service admin equivalent • New Policy management cmdlets on limited Preview • Policy packages • User policies • Policy assignment to groups
  • 21. Common tasks with Teams PowerShell • Provisioning Teams • Adding Apps to Teams • Some migration cases, where conversation are not meaningful • Reports
  • 22. BONUS: New Graph PowerShell SDK Preview • Collection of modules for calling Microsoft Graph API • Running on PowerShell Core • Open-source • Available on PowerShell Gallery
  • 24. Wrap-up • PowerShell is not scary! You need to learn it • Keep your scripts simple and reusable • Build your script library • docs.microsoft.com is your friend! • #SharingIsCaring – share your knowledge & examples
  • 25. Useful resources & links • Getting started with Office 365 PowerShell: https://docs.microsoft.com/en- us/office365/enterprise/powershell/getting-started-with-office-365-powershell • AzureAD PowerShell: https://docs.microsoft.com/en-us/powershell/azure/active- directory/install-adv2?view=azureadps-2.0 • Exchange PowerShell: https://docs.microsoft.com/en-us/powershell/exchange/?view=exchange- ps • SPO Management Shell: https://docs.microsoft.com/en-us/powershell/sharepoint/sharepoint- online/connect-sharepoint-online?view=sharepoint-ps • PnP PowerShell: https://docs.microsoft.com/en-us/powershell/sharepoint/sharepoint- pnp/sharepoint-pnp-cmdlets?view=sharepoint-ps • Teams PowerShell: https://docs.microsoft.com/en-us/MicrosoftTeams/teams-powershell- overview • Microsoft Docs, PowerShell: https://docs.microsoft.com/en-us/powershell/ • Microsoft Tech Community, PowerShell: https://techcommunity.microsoft.com/t5/powershell/ct-p/WindowsPowerShell
  • 26. Teams Community Finland Next online meeting 9.3.2020 klo 15 https://www.meetup.com/spugfi/events/266721690/ Jari Tuisku (Microsoft) Milla Järvi #TeamsFi | #MSTeamsDev | #SharingIsCaring