A beginners guide to administering office 365 with power shell antonio maio

Internal Audit, Risk, Business & Technology Consulting
A BEGINNERS GUIDE TO ADMINISTERING
OFFICE 365 WITH POWERSHELL
Antonio Maio
Protiviti | Senior Enterprise Architect
Microsoft Office Server and Services MVP
Email: antonio.maio@protiviti.com
Blog: www.trustsharepoint.com
Slide share: http://www.slideshare.net/AntonioMaio2
Twitter: @AntonioMaio2
© 2017 Protiviti Inc. An Equal Opportunity Employer M/F/Disability/Veterans. Protiviti is not licensed or registered as a public accounting firm and
does not issue opinions on financial statements or offer attestation services. All registered trademarks are the property of their respective owners.
Doesn’t the Office 365 Admin Centers give me everything I need to manage Office 365?
© 2017 Protiviti Inc. An Equal Opportunity Employer M/F/Disability/Veterans. Protiviti is not licensed or registered as a public accounting firm and
does not issue opinions on financial statements or offer attestation services. All registered trademarks are the property of their respective owners.
Understand why you should use Office 365 PowerShell to manage Office 365, for efficiency and in some cases by necessity.
Efficiently
perform bulk
operations
Features you
can only
configure
using
PowerShell
Reveal info
you cannot
see in the
Office 365
Admin Center
Efficiently
Filter, Save
and Print
Data
Manage
Office 365
Across
Server
Products
© 2017 Protiviti Inc. An Equal Opportunity Employer M/F/Disability/Veterans. Protiviti is not licensed or registered as a public accounting firm and
does not issue opinions on financial statements or offer attestation services. All registered trademarks are the property of their respective owners.
https://go.microsoft.com/fwlink/p/?LinkId=286152
https://go.microsoft.com/fwlink/p/?linkid=236297
https://go.microsoft.com/fwlink/p/?LinkId=255251
https://go.microsoft.com/fwlink/p/?LinkId=532439
Before you can manage all of Office 365 from a single instance of Windows PowerShell, consider these prerequisites.
© 2017 Protiviti Inc. An Equal Opportunity Employer M/F/Disability/Veterans. Protiviti is not licensed or registered as a public accounting firm and
does not issue opinions on financial statements or offer attestation services. All registered trademarks are the property of their respective owners.
No scripts can be run.Windows PowerShell can be usedonly in interactive mode.
Only scripts signedby a trusted publisher can be run.
Downloaded scripts must be signed by a trustedpublisherbefore they can be run.
No restrictions;all Windows PowerShell scripts can be run.
Set-ExecutionPolicy RemoteSigned
Learn how to set the Windows PowerShell script execution policy on your computer so that you can run scripts.
© 2017 Protiviti Inc. An Equal Opportunity Employer M/F/Disability/Veterans. Protiviti is not licensed or registered as a public accounting firm and
does not issue opinions on financial statements or offer attestation services. All registered trademarks are the property of their respective owners.
verb-noun (for example, get-childitem)
.myscriptname.ps1
.myscriptname.ps1 –parameter1 value –parameter2 value
$PSVersionTable.PSVersion
Learn the basics of how to run and work with PowerShell
© 2017 Protiviti Inc. An Equal Opportunity Employer M/F/Disability/Veterans. Protiviti is not licensed or registered as a public accounting firm and
does not issue opinions on financial statements or offer attestation services. All registered trademarks are the property of their respective owners.
Learn how to connect to these modules which are required for Office 365, SharePoint Online, and Skype for Business Online.
© 2017 Protiviti Inc. An Equal Opportunity Employer M/F/Disability/Veterans. Protiviti is not licensed or registered as a public accounting firm and
does not issue opinions on financial statements or offer attestation services. All registered trademarks are the property of their respective owners.
$credential = Get-Credential
Connect-MsolService -Credential $credential
Simplest method to connect to Office 365 using PowerShell. Have access to easy-to-use cmdlets for Azure AD.
© 2017 Protiviti Inc. An Equal Opportunity Employer M/F/Disability/Veterans. Protiviti is not licensed or registered as a public accounting firm and
does not issue opinions on financial statements or offer attestation services. All registered trademarks are the property of their respective owners.
$credential = Get-Credential
$exchangeSession = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri
"https://outlook.office365.com/powershell-liveid/" -Credential $credential -Authentication
"Basic" –AllowRedirection
Import-PSSession $exchangeSession
Use any PowerShell module to run these cmdlets to connect and download cmdlets for Exchange Online Module for PowerShell.
© 2017 Protiviti Inc. An Equal Opportunity Employer M/F/Disability/Veterans. Protiviti is not licensed or registered as a public accounting firm and
does not issue opinions on financial statements or offer attestation services. All registered trademarks are the property of their respective owners.
$credential = Get-Credential
$siteUrl = “https://<O365TenantDomain>-admin.sharepoint.com)”
Connect-SPOService -Url $siteUrl -credential $credential
Use the SharePoint Online Management Shell and these cmdlets to connect to SharePoint Online Module for PowerShell.
© 2017 Protiviti Inc. An Equal Opportunity Employer M/F/Disability/Veterans. Protiviti is not licensed or registered as a public accounting firm and
does not issue opinions on financial statements or offer attestation services. All registered trademarks are the property of their respective owners.
$UserCredential = Get-Credential
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri
https://ps.compliance.protection.outlook.com/powershell-liveid/ -Credential
$UserCredential -Authentication Basic -AllowRedirection
Import-PSSession $Session
Use any PowerShell module to run these cmdlets to connect and download cmdlets for the Security & Compliance Center.
© 2017 Protiviti Inc. An Equal Opportunity Employer M/F/Disability/Veterans. Protiviti is not licensed or registered as a public accounting firm and
does not issue opinions on financial statements or offer attestation services. All registered trademarks are the property of their respective owners.
$UserCredential = Get-Credential
$sfboSession = New-CsOnlineSession -Credential $credential
Import-PSSession $sfboSession
Use the Skype for Business Online Windows PowerShell Module and these cmdlets to connect to Skype for Business Online.
© 2017 Protiviti Inc. An Equal Opportunity Employer M/F/Disability/Veterans. Protiviti is not licensed or registered as a public accounting firm and
does not issue opinions on financial statements or offer attestation services. All registered trademarks are the property of their respective owners.
Manage Azure AD using Windows PowerShell
Exchange Online Cmdlets
Windows PowerShell for SharePoint Online Cmdlets
Office 365 Security & Compliance Center Cmdlets
Skype for Business Online Cmdlets
Check these references for more Office 365 PowerShell cmdlets.
© 2017 Protiviti Inc. An Equal Opportunity Employer M/F/Disability/Veterans. Protiviti is not licensed or registered as a public accounting firm and
does not issue opinions on financial statements or offer attestation services. All registered trademarks are the property of their respective owners.
User and license management related cmdlets.
Connect-MsolService
Connect to your Office 365 Service.
Get-MsolUser or Get-MsolUser | Select DisplayName, UsageLocation, UserPrincipalName
Display list of users currently within your Office 365 tenant.
Get-MsolUser –UnlicensedUsersOnly
Display only list of users in your Office 365 tenant which do not have a license.
Get-MsolAccountSku
Displays your Office 365 tenant license SKU. Use this when assigning a license.
Set-MsolUser -UserPrincipalName “<user’s upn>” -UsageLocation "US“
Set the location for a specific user by specifying the user principal name.
Set-MsolUserLicense -UserPrincipalName " <user’s upn> " -AddLicenses “<your license SKU“
Set a license for the specified user. Use the SKU displayed by the command above.
Get-MsolUser | Select DisplayName, UsageLocation, UserPrincipalName | Export-CSV –Path “c:myusers.csv”
Gets a list of all users with specific attributes for each user, and outputs the list to a CSV file.
• Combine Powershell commands to assign licenses to all unlicensed users
Get-MsolUser -UnlicensedUsersOnly | Set-Msoluser - UsageLocation "US“
Get-MsolUser -UnlicensedUsersOnly | Set-MsolUserLicense -AddLicenses “<your license SKU>"
© 2017 Protiviti Inc. An Equal Opportunity Employer M/F/Disability/Veterans. Protiviti is not licensed or registered as a public accounting firm and
does not issue opinions on financial statements or offer attestation services. All registered trademarks are the property of their respective owners.
User PowerShell to find out which cmdlets are available for a particular module.
Get-Command
Get-Command –Module msonline
Get-Command -Module Microsoft.PowerShell.Security
Get-Command | where {$_.ModuleName -eq "Microsoft.Online.SharePoint.PowerShell"}
Help <name of the command>
© 2017 Protiviti Inc. An Equal Opportunity Employer M/F/Disability/Veterans. Protiviti is not licensed or registered as a public accounting firm and
does not issue opinions on financial statements or offer attestation services. All registered trademarks are the property of their respective owners.
There are more available then you realize.
There are 93 available
today!
Internal Audit, Risk, Business & Technology Consulting
DEMONSTRATION
Using PowerShell to Administer Office 365
© 2017 Protiviti Inc. An Equal Opportunity Employer M/F/Disability/Veterans. Protiviti is not licensed or registered as a public accounting firm and
does not issue opinions on financial statements or offer attestation services. All registered trademarks are the property of their respective owners.
Learn PowerShell for Office 365 to become more efficient and access all the power of an Office 365 administrator!
Efficiently
perform bulk
operations
Features you
can only
configure
using
PowerShell
Reveal info
you cannot
see in the
Office 365
Admin Center
Efficiently
Filter, Save
and Print
Data
Manage
Office 365
Across
Server
Products
Internal Audit, Risk, Business & Technology Consulting
THANK YOU
Antonio Maio
Protiviti | Senior Enterprise Architect
Microsoft Office Server and Services MVP
Email: antonio.maio@protiviti.com
Blog: www.trustsharepoint.com
Slide share: http://www.slideshare.net/AntonioMaio2
Twitter: @AntonioMaio2
1 of 19

Recommended

Office 365 Security - MacGyver, Ninja or Swat team by
Office 365 Security -  MacGyver, Ninja or Swat teamOffice 365 Security -  MacGyver, Ninja or Swat team
Office 365 Security - MacGyver, Ninja or Swat teamAntonioMaio2
5.8K views33 slides
Office 365 security new innovations from microsoft ignite - antonio maio by
Office 365 security   new innovations from microsoft ignite - antonio maioOffice 365 security   new innovations from microsoft ignite - antonio maio
Office 365 security new innovations from microsoft ignite - antonio maioAntonioMaio2
633 views18 slides
Introduction to Microsoft Enterprise Mobility + Security by
Introduction to Microsoft Enterprise Mobility + SecurityIntroduction to Microsoft Enterprise Mobility + Security
Introduction to Microsoft Enterprise Mobility + SecurityAntonioMaio2
5.3K views26 slides
Being more secure using Microsoft 365 Business by
Being more secure using Microsoft 365 BusinessBeing more secure using Microsoft 365 Business
Being more secure using Microsoft 365 BusinessRobert Crane
1.8K views49 slides
AzureThursday Mirabeau - Azure Information Protection by
AzureThursday Mirabeau - Azure Information ProtectionAzureThursday Mirabeau - Azure Information Protection
AzureThursday Mirabeau - Azure Information ProtectionAlbert Hoitingh
293 views24 slides
Azure information protection and SharePoint by
Azure information protection and SharePoint Azure information protection and SharePoint
Azure information protection and SharePoint Albert Hoitingh
942 views31 slides

More Related Content

What's hot

Secure your Access to Cloud Apps using Microsoft Defender for Cloud Apps by
Secure your Access to Cloud Apps using Microsoft Defender for Cloud AppsSecure your Access to Cloud Apps using Microsoft Defender for Cloud Apps
Secure your Access to Cloud Apps using Microsoft Defender for Cloud AppsVignesh Ganesan I Microsoft MVP
788 views32 slides
CollabDays BeNeLux Sensitivity labels: what's new by
CollabDays BeNeLux Sensitivity labels: what's newCollabDays BeNeLux Sensitivity labels: what's new
CollabDays BeNeLux Sensitivity labels: what's newAlbert Hoitingh
158 views26 slides
Identity and Data protection with Enterprise Mobility Security in ottica GDPR by
Identity and Data protection with Enterprise Mobility Security in ottica GDPRIdentity and Data protection with Enterprise Mobility Security in ottica GDPR
Identity and Data protection with Enterprise Mobility Security in ottica GDPRJürgen Ambrosi
385 views30 slides
Working securely with Microsoft Teams - Techorama 2021 by
Working securely with Microsoft Teams - Techorama 2021Working securely with Microsoft Teams - Techorama 2021
Working securely with Microsoft Teams - Techorama 2021Albert Hoitingh
130 views40 slides
Learn how to protect against and recover from data breaches in Office 365 by
Learn how to protect against and recover from data breaches in Office 365Learn how to protect against and recover from data breaches in Office 365
Learn how to protect against and recover from data breaches in Office 365AntonioMaio2
393 views50 slides
File Security in Microsoft SharePoint and OneDrive by
File Security in Microsoft SharePoint and OneDriveFile Security in Microsoft SharePoint and OneDrive
File Security in Microsoft SharePoint and OneDriveDavid J Rosenthal
1.1K views16 slides

What's hot(20)

CollabDays BeNeLux Sensitivity labels: what's new by Albert Hoitingh
CollabDays BeNeLux Sensitivity labels: what's newCollabDays BeNeLux Sensitivity labels: what's new
CollabDays BeNeLux Sensitivity labels: what's new
Albert Hoitingh158 views
Identity and Data protection with Enterprise Mobility Security in ottica GDPR by Jürgen Ambrosi
Identity and Data protection with Enterprise Mobility Security in ottica GDPRIdentity and Data protection with Enterprise Mobility Security in ottica GDPR
Identity and Data protection with Enterprise Mobility Security in ottica GDPR
Jürgen Ambrosi385 views
Working securely with Microsoft Teams - Techorama 2021 by Albert Hoitingh
Working securely with Microsoft Teams - Techorama 2021Working securely with Microsoft Teams - Techorama 2021
Working securely with Microsoft Teams - Techorama 2021
Albert Hoitingh130 views
Learn how to protect against and recover from data breaches in Office 365 by AntonioMaio2
Learn how to protect against and recover from data breaches in Office 365Learn how to protect against and recover from data breaches in Office 365
Learn how to protect against and recover from data breaches in Office 365
AntonioMaio2393 views
File Security in Microsoft SharePoint and OneDrive by David J Rosenthal
File Security in Microsoft SharePoint and OneDriveFile Security in Microsoft SharePoint and OneDrive
File Security in Microsoft SharePoint and OneDrive
David J Rosenthal1.1K views
Securing Governing and Protecting Your Office 365 Investments by Chris Bortlik
Securing Governing and Protecting Your Office 365 InvestmentsSecuring Governing and Protecting Your Office 365 Investments
Securing Governing and Protecting Your Office 365 Investments
Chris Bortlik136 views
Management of all the devices using Microsoft 365 Business by Robert Crane
Management of all the devices using Microsoft 365 BusinessManagement of all the devices using Microsoft 365 Business
Management of all the devices using Microsoft 365 Business
Robert Crane453 views
Azure Information Protection by Robert Crane
Azure Information ProtectionAzure Information Protection
Azure Information Protection
Robert Crane6.2K views
Supporting Remote Work While Securing, Governing, and Protecting Your Microso... by Chris Bortlik
Supporting Remote Work While Securing, Governing, and Protecting Your Microso...Supporting Remote Work While Securing, Governing, and Protecting Your Microso...
Supporting Remote Work While Securing, Governing, and Protecting Your Microso...
Chris Bortlik224 views
Microsoft 365 and Microsoft Cloud App Security by Albert Hoitingh
Microsoft 365 and Microsoft Cloud App SecurityMicrosoft 365 and Microsoft Cloud App Security
Microsoft 365 and Microsoft Cloud App Security
Albert Hoitingh323 views
Cryptzone SharePoint and Office 365 Security Solutions Guide by David J Rosenthal
Cryptzone SharePoint and Office 365 Security Solutions GuideCryptzone SharePoint and Office 365 Security Solutions Guide
Cryptzone SharePoint and Office 365 Security Solutions Guide
David J Rosenthal826 views
Overview of Microsoft Enterprise Mobility & Security(EMS) by Radhakrishnan Govindan
Overview of Microsoft Enterprise Mobility & Security(EMS)Overview of Microsoft Enterprise Mobility & Security(EMS)
Overview of Microsoft Enterprise Mobility & Security(EMS)
Protecting corporate data with Enterprise Mobility Suite by Ronny de Jong
Protecting corporate data with Enterprise Mobility SuiteProtecting corporate data with Enterprise Mobility Suite
Protecting corporate data with Enterprise Mobility Suite
Ronny de Jong600 views
aMS SouthEast Asia 2021 - Microsoft 365 Data Loss Prevention by Albert Hoitingh
aMS SouthEast Asia 2021 - Microsoft 365 Data Loss PreventionaMS SouthEast Asia 2021 - Microsoft 365 Data Loss Prevention
aMS SouthEast Asia 2021 - Microsoft 365 Data Loss Prevention
Albert Hoitingh154 views
O365Con18 - Compliance Manager - Tomislav Lulic by NCCOMMS
O365Con18 - Compliance Manager - Tomislav LulicO365Con18 - Compliance Manager - Tomislav Lulic
O365Con18 - Compliance Manager - Tomislav Lulic
NCCOMMS114 views
Focusing on security with Microsoft 365 Business by Robert Crane
Focusing on security with Microsoft 365 BusinessFocusing on security with Microsoft 365 Business
Focusing on security with Microsoft 365 Business
Robert Crane1.4K views

Similar to A beginners guide to administering office 365 with power shell antonio maio

OpenID Connect and Single Sign-On for Beginners by
OpenID Connect and Single Sign-On for BeginnersOpenID Connect and Single Sign-On for Beginners
OpenID Connect and Single Sign-On for BeginnersSalesforce Developers
22.7K views30 slides
TSQA 2020: SAS ENTERPRISE: ACHIEVING WARP SPEED BY TRANSFORMING AUTOMATION IN... by
TSQA 2020: SAS ENTERPRISE: ACHIEVING WARP SPEED BY TRANSFORMING AUTOMATION IN...TSQA 2020: SAS ENTERPRISE: ACHIEVING WARP SPEED BY TRANSFORMING AUTOMATION IN...
TSQA 2020: SAS ENTERPRISE: ACHIEVING WARP SPEED BY TRANSFORMING AUTOMATION IN...Ken Dickinson
74 views35 slides
ISV Tech Talk: Environment Hub (October 15, 2014) by
ISV Tech Talk: Environment Hub (October 15, 2014)ISV Tech Talk: Environment Hub (October 15, 2014)
ISV Tech Talk: Environment Hub (October 15, 2014)Salesforce Partners
824 views18 slides
Esop Guardian Presentation by
Esop Guardian PresentationEsop Guardian Presentation
Esop Guardian PresentationCorporate Professionals
12.8K views24 slides
Introduction to Mulesoft and Salesforce Spring '19 release features by
Introduction to Mulesoft and Salesforce Spring '19 release featuresIntroduction to Mulesoft and Salesforce Spring '19 release features
Introduction to Mulesoft and Salesforce Spring '19 release featuresBordeaux Salesforce Developer Group
585 views34 slides
Integrating with salesforce by
Integrating with salesforceIntegrating with salesforce
Integrating with salesforceMark Adcock
850 views46 slides

Similar to A beginners guide to administering office 365 with power shell antonio maio(20)

TSQA 2020: SAS ENTERPRISE: ACHIEVING WARP SPEED BY TRANSFORMING AUTOMATION IN... by Ken Dickinson
TSQA 2020: SAS ENTERPRISE: ACHIEVING WARP SPEED BY TRANSFORMING AUTOMATION IN...TSQA 2020: SAS ENTERPRISE: ACHIEVING WARP SPEED BY TRANSFORMING AUTOMATION IN...
TSQA 2020: SAS ENTERPRISE: ACHIEVING WARP SPEED BY TRANSFORMING AUTOMATION IN...
Ken Dickinson74 views
ISV Tech Talk: Environment Hub (October 15, 2014) by Salesforce Partners
ISV Tech Talk: Environment Hub (October 15, 2014)ISV Tech Talk: Environment Hub (October 15, 2014)
ISV Tech Talk: Environment Hub (October 15, 2014)
Integrating with salesforce by Mark Adcock
Integrating with salesforceIntegrating with salesforce
Integrating with salesforce
Mark Adcock850 views
Overcoming Security Threats and Vulnerabilities in SharePoint by AntonioMaio2
Overcoming Security Threats and Vulnerabilities in SharePointOvercoming Security Threats and Vulnerabilities in SharePoint
Overcoming Security Threats and Vulnerabilities in SharePoint
AntonioMaio22.2K views
[MBF2] Plate-forme Salesforce par Peter Chittum by BeMyApp
[MBF2] Plate-forme Salesforce par Peter Chittum[MBF2] Plate-forme Salesforce par Peter Chittum
[MBF2] Plate-forme Salesforce par Peter Chittum
BeMyApp524 views
Trailhead live - Overview of Salesforce App Cloud by John Stevenson
Trailhead live - Overview of Salesforce App CloudTrailhead live - Overview of Salesforce App Cloud
Trailhead live - Overview of Salesforce App Cloud
John Stevenson1.3K views
OpenID Connect: The new standard for connecting to your Customers, Partners, ... by Salesforce Developers
OpenID Connect: The new standard for connecting to your Customers, Partners, ...OpenID Connect: The new standard for connecting to your Customers, Partners, ...
OpenID Connect: The new standard for connecting to your Customers, Partners, ...
Salesforce Developers12.1K views
If You Can Write a Salesforce Formula, You Can Use the Command Line by Peter Chittum
If You Can Write a Salesforce Formula, You Can Use the Command LineIf You Can Write a Salesforce Formula, You Can Use the Command Line
If You Can Write a Salesforce Formula, You Can Use the Command Line
Peter Chittum582 views
San Diego Salesforce User Group - Lightning Overview by Vivek Chawla
San Diego Salesforce User Group - Lightning OverviewSan Diego Salesforce User Group - Lightning Overview
San Diego Salesforce User Group - Lightning Overview
Vivek Chawla641 views
CA Identity Suite – Extending Identity Management to the Business User by CA Technologies
CA Identity Suite – Extending Identity Management to the Business UserCA Identity Suite – Extending Identity Management to the Business User
CA Identity Suite – Extending Identity Management to the Business User
CA Technologies2.3K views
What’s new in summer’15 release - Security & Compliance by Shesh Kondi
What’s new in summer’15 release - Security & ComplianceWhat’s new in summer’15 release - Security & Compliance
What’s new in summer’15 release - Security & Compliance
Shesh Kondi706 views
What’s new in summer’15 release - Security & Compliance by Shesh Kondi
What’s new in summer’15 release - Security & ComplianceWhat’s new in summer’15 release - Security & Compliance
What’s new in summer’15 release - Security & Compliance
Shesh Kondi388 views

More from AntonioMaio2

Information security in office 365 a shared responsibility - antonio maio by
Information security in office 365   a shared responsibility - antonio maioInformation security in office 365   a shared responsibility - antonio maio
Information security in office 365 a shared responsibility - antonio maioAntonioMaio2
664 views14 slides
SharePoint Saturday Ottawa - How secure is my data in office 365? by
SharePoint Saturday Ottawa - How secure is my data in office 365?SharePoint Saturday Ottawa - How secure is my data in office 365?
SharePoint Saturday Ottawa - How secure is my data in office 365?AntonioMaio2
2.1K views30 slides
Real world SharePoint information governance a case study - published by
Real world SharePoint information governance a case study - publishedReal world SharePoint information governance a case study - published
Real world SharePoint information governance a case study - publishedAntonioMaio2
1.9K views32 slides
What’s new in SharePoint 2016! by
What’s new in SharePoint 2016!What’s new in SharePoint 2016!
What’s new in SharePoint 2016!AntonioMaio2
2.1K views23 slides
Data Visualization in SharePoint and Office 365 by
Data Visualization in SharePoint and Office 365Data Visualization in SharePoint and Office 365
Data Visualization in SharePoint and Office 365AntonioMaio2
6.3K views46 slides
Hybrid Identity Management with SharePoint and Office 365 - Antonio Maio by
Hybrid Identity Management with SharePoint and Office 365 - Antonio MaioHybrid Identity Management with SharePoint and Office 365 - Antonio Maio
Hybrid Identity Management with SharePoint and Office 365 - Antonio MaioAntonioMaio2
2.4K views44 slides

More from AntonioMaio2(20)

Information security in office 365 a shared responsibility - antonio maio by AntonioMaio2
Information security in office 365   a shared responsibility - antonio maioInformation security in office 365   a shared responsibility - antonio maio
Information security in office 365 a shared responsibility - antonio maio
AntonioMaio2664 views
SharePoint Saturday Ottawa - How secure is my data in office 365? by AntonioMaio2
SharePoint Saturday Ottawa - How secure is my data in office 365?SharePoint Saturday Ottawa - How secure is my data in office 365?
SharePoint Saturday Ottawa - How secure is my data in office 365?
AntonioMaio22.1K views
Real world SharePoint information governance a case study - published by AntonioMaio2
Real world SharePoint information governance a case study - publishedReal world SharePoint information governance a case study - published
Real world SharePoint information governance a case study - published
AntonioMaio21.9K views
What’s new in SharePoint 2016! by AntonioMaio2
What’s new in SharePoint 2016!What’s new in SharePoint 2016!
What’s new in SharePoint 2016!
AntonioMaio22.1K views
Data Visualization in SharePoint and Office 365 by AntonioMaio2
Data Visualization in SharePoint and Office 365Data Visualization in SharePoint and Office 365
Data Visualization in SharePoint and Office 365
AntonioMaio26.3K views
Hybrid Identity Management with SharePoint and Office 365 - Antonio Maio by AntonioMaio2
Hybrid Identity Management with SharePoint and Office 365 - Antonio MaioHybrid Identity Management with SharePoint and Office 365 - Antonio Maio
Hybrid Identity Management with SharePoint and Office 365 - Antonio Maio
AntonioMaio22.4K views
Developing custom claim providers to enable authorization in share point an... by AntonioMaio2
Developing custom claim providers to enable authorization in share point   an...Developing custom claim providers to enable authorization in share point   an...
Developing custom claim providers to enable authorization in share point an...
AntonioMaio212.9K views
Identity management challenges when moving share point to the cloud antonio... by AntonioMaio2
Identity management challenges when moving share point to the cloud   antonio...Identity management challenges when moving share point to the cloud   antonio...
Identity management challenges when moving share point to the cloud antonio...
AntonioMaio2540 views
A Practical Guide Information Governance with Microsoft SharePoint 2013 by AntonioMaio2
A Practical Guide Information Governance with Microsoft SharePoint 2013A Practical Guide Information Governance with Microsoft SharePoint 2013
A Practical Guide Information Governance with Microsoft SharePoint 2013
AntonioMaio2908 views
Best practices for security and governance in share point 2013 published by AntonioMaio2
Best practices for security and governance in share point 2013   publishedBest practices for security and governance in share point 2013   published
Best practices for security and governance in share point 2013 published
AntonioMaio21.4K views
Keeping SharePoint Always On by AntonioMaio2
Keeping SharePoint Always OnKeeping SharePoint Always On
Keeping SharePoint Always On
AntonioMaio2774 views
How Claims is Changing the Way We Authenticate and Authorize in SharePoint by AntonioMaio2
How Claims is Changing the Way We Authenticate and Authorize in SharePointHow Claims is Changing the Way We Authenticate and Authorize in SharePoint
How Claims is Changing the Way We Authenticate and Authorize in SharePoint
AntonioMaio23.2K views
Best practices for Security and Governance in SharePoint 2013 by AntonioMaio2
Best practices for Security and Governance in SharePoint 2013Best practices for Security and Governance in SharePoint 2013
Best practices for Security and Governance in SharePoint 2013
AntonioMaio24.9K views
SPTechCon Boston 2013 - Introduction to Security in Microsoft Sharepoint 2013... by AntonioMaio2
SPTechCon Boston 2013 - Introduction to Security in Microsoft Sharepoint 2013...SPTechCon Boston 2013 - Introduction to Security in Microsoft Sharepoint 2013...
SPTechCon Boston 2013 - Introduction to Security in Microsoft Sharepoint 2013...
AntonioMaio22K views
Best Practices for Security in Microsoft SharePoint 2013 by AntonioMaio2
Best Practices for Security in Microsoft SharePoint 2013Best Practices for Security in Microsoft SharePoint 2013
Best Practices for Security in Microsoft SharePoint 2013
AntonioMaio229.7K views
Intro to Develop and Deploy Apps for Microsoft SharePoint and Office 2013 by AntonioMaio2
Intro to Develop and Deploy Apps for Microsoft SharePoint and Office 2013Intro to Develop and Deploy Apps for Microsoft SharePoint and Office 2013
Intro to Develop and Deploy Apps for Microsoft SharePoint and Office 2013
AntonioMaio22.1K views
SharePoint Governance: Impacts of Moving to the Cloud by AntonioMaio2
SharePoint Governance: Impacts of Moving to the CloudSharePoint Governance: Impacts of Moving to the Cloud
SharePoint Governance: Impacts of Moving to the Cloud
AntonioMaio2610 views
Share point security 101 sps-ottawa 2012 - antonio maio by AntonioMaio2
Share point security 101   sps-ottawa 2012 - antonio maioShare point security 101   sps-ottawa 2012 - antonio maio
Share point security 101 sps-ottawa 2012 - antonio maio
AntonioMaio22.1K views
Webinar: Take Control of SharePoint Security by AntonioMaio2
Webinar: Take Control of SharePoint SecurityWebinar: Take Control of SharePoint Security
Webinar: Take Control of SharePoint Security
AntonioMaio2857 views
SharePoint Saturday Toronto July 2012 - Antonio Maio by AntonioMaio2
SharePoint Saturday Toronto July 2012 - Antonio MaioSharePoint Saturday Toronto July 2012 - Antonio Maio
SharePoint Saturday Toronto July 2012 - Antonio Maio
AntonioMaio21.2K views

Recently uploaded

Using Qt under LGPL-3.0 by
Using Qt under LGPL-3.0Using Qt under LGPL-3.0
Using Qt under LGPL-3.0Burkhard Stubert
13 views11 slides
MS PowerPoint.pptx by
MS PowerPoint.pptxMS PowerPoint.pptx
MS PowerPoint.pptxLitty Sylus
7 views14 slides
Quality Engineer: A Day in the Life by
Quality Engineer: A Day in the LifeQuality Engineer: A Day in the Life
Quality Engineer: A Day in the LifeJohn Valentino
7 views18 slides
Introduction to Git Source Control by
Introduction to Git Source ControlIntroduction to Git Source Control
Introduction to Git Source ControlJohn Valentino
6 views18 slides
EV Charging App Case by
EV Charging App Case EV Charging App Case
EV Charging App Case iCoderz Solutions
9 views1 slide
AI and Ml presentation .pptx by
AI and Ml presentation .pptxAI and Ml presentation .pptx
AI and Ml presentation .pptxFayazAli87
13 views15 slides

Recently uploaded(20)

Quality Engineer: A Day in the Life by John Valentino
Quality Engineer: A Day in the LifeQuality Engineer: A Day in the Life
Quality Engineer: A Day in the Life
John Valentino7 views
Introduction to Git Source Control by John Valentino
Introduction to Git Source ControlIntroduction to Git Source Control
Introduction to Git Source Control
John Valentino6 views
AI and Ml presentation .pptx by FayazAli87
AI and Ml presentation .pptxAI and Ml presentation .pptx
AI and Ml presentation .pptx
FayazAli8713 views
Understanding HTML terminology by artembondar5
Understanding HTML terminologyUnderstanding HTML terminology
Understanding HTML terminology
artembondar56 views
Dev-HRE-Ops - Addressing the _Last Mile DevOps Challenge_ in Highly Regulated... by TomHalpin9
Dev-HRE-Ops - Addressing the _Last Mile DevOps Challenge_ in Highly Regulated...Dev-HRE-Ops - Addressing the _Last Mile DevOps Challenge_ in Highly Regulated...
Dev-HRE-Ops - Addressing the _Last Mile DevOps Challenge_ in Highly Regulated...
TomHalpin96 views
Fleet Management Software in India by Fleetable
Fleet Management Software in India Fleet Management Software in India
Fleet Management Software in India
Fleetable12 views
Gen Apps on Google Cloud PaLM2 and Codey APIs in Action by Márton Kodok
Gen Apps on Google Cloud PaLM2 and Codey APIs in ActionGen Apps on Google Cloud PaLM2 and Codey APIs in Action
Gen Apps on Google Cloud PaLM2 and Codey APIs in Action
Márton Kodok15 views
2023-November-Schneider Electric-Meetup-BCN Admin Group.pptx by animuscrm
2023-November-Schneider Electric-Meetup-BCN Admin Group.pptx2023-November-Schneider Electric-Meetup-BCN Admin Group.pptx
2023-November-Schneider Electric-Meetup-BCN Admin Group.pptx
animuscrm15 views
20231129 - Platform @ localhost 2023 - Application-driven infrastructure with... by sparkfabrik
20231129 - Platform @ localhost 2023 - Application-driven infrastructure with...20231129 - Platform @ localhost 2023 - Application-driven infrastructure with...
20231129 - Platform @ localhost 2023 - Application-driven infrastructure with...
sparkfabrik8 views
DRYiCE™ iAutomate: AI-enhanced Intelligent Runbook Automation by HCLSoftware
DRYiCE™ iAutomate: AI-enhanced Intelligent Runbook AutomationDRYiCE™ iAutomate: AI-enhanced Intelligent Runbook Automation
DRYiCE™ iAutomate: AI-enhanced Intelligent Runbook Automation
HCLSoftware6 views
Bootstrapping vs Venture Capital.pptx by Zeljko Svedic
Bootstrapping vs Venture Capital.pptxBootstrapping vs Venture Capital.pptx
Bootstrapping vs Venture Capital.pptx
Zeljko Svedic14 views
Top-5-production-devconMunich-2023.pptx by Tier1 app
Top-5-production-devconMunich-2023.pptxTop-5-production-devconMunich-2023.pptx
Top-5-production-devconMunich-2023.pptx
Tier1 app8 views
Team Transformation Tactics for Holistic Testing and Quality (Japan Symposium... by Lisi Hocke
Team Transformation Tactics for Holistic Testing and Quality (Japan Symposium...Team Transformation Tactics for Holistic Testing and Quality (Japan Symposium...
Team Transformation Tactics for Holistic Testing and Quality (Japan Symposium...
Lisi Hocke35 views

A beginners guide to administering office 365 with power shell antonio maio

  • 1. Internal Audit, Risk, Business & Technology Consulting A BEGINNERS GUIDE TO ADMINISTERING OFFICE 365 WITH POWERSHELL Antonio Maio Protiviti | Senior Enterprise Architect Microsoft Office Server and Services MVP Email: antonio.maio@protiviti.com Blog: www.trustsharepoint.com Slide share: http://www.slideshare.net/AntonioMaio2 Twitter: @AntonioMaio2
  • 2. © 2017 Protiviti Inc. An Equal Opportunity Employer M/F/Disability/Veterans. Protiviti is not licensed or registered as a public accounting firm and does not issue opinions on financial statements or offer attestation services. All registered trademarks are the property of their respective owners. Doesn’t the Office 365 Admin Centers give me everything I need to manage Office 365?
  • 3. © 2017 Protiviti Inc. An Equal Opportunity Employer M/F/Disability/Veterans. Protiviti is not licensed or registered as a public accounting firm and does not issue opinions on financial statements or offer attestation services. All registered trademarks are the property of their respective owners. Understand why you should use Office 365 PowerShell to manage Office 365, for efficiency and in some cases by necessity. Efficiently perform bulk operations Features you can only configure using PowerShell Reveal info you cannot see in the Office 365 Admin Center Efficiently Filter, Save and Print Data Manage Office 365 Across Server Products
  • 4. © 2017 Protiviti Inc. An Equal Opportunity Employer M/F/Disability/Veterans. Protiviti is not licensed or registered as a public accounting firm and does not issue opinions on financial statements or offer attestation services. All registered trademarks are the property of their respective owners. https://go.microsoft.com/fwlink/p/?LinkId=286152 https://go.microsoft.com/fwlink/p/?linkid=236297 https://go.microsoft.com/fwlink/p/?LinkId=255251 https://go.microsoft.com/fwlink/p/?LinkId=532439 Before you can manage all of Office 365 from a single instance of Windows PowerShell, consider these prerequisites.
  • 5. © 2017 Protiviti Inc. An Equal Opportunity Employer M/F/Disability/Veterans. Protiviti is not licensed or registered as a public accounting firm and does not issue opinions on financial statements or offer attestation services. All registered trademarks are the property of their respective owners. No scripts can be run.Windows PowerShell can be usedonly in interactive mode. Only scripts signedby a trusted publisher can be run. Downloaded scripts must be signed by a trustedpublisherbefore they can be run. No restrictions;all Windows PowerShell scripts can be run. Set-ExecutionPolicy RemoteSigned Learn how to set the Windows PowerShell script execution policy on your computer so that you can run scripts.
  • 6. © 2017 Protiviti Inc. An Equal Opportunity Employer M/F/Disability/Veterans. Protiviti is not licensed or registered as a public accounting firm and does not issue opinions on financial statements or offer attestation services. All registered trademarks are the property of their respective owners. verb-noun (for example, get-childitem) .myscriptname.ps1 .myscriptname.ps1 –parameter1 value –parameter2 value $PSVersionTable.PSVersion Learn the basics of how to run and work with PowerShell
  • 7. © 2017 Protiviti Inc. An Equal Opportunity Employer M/F/Disability/Veterans. Protiviti is not licensed or registered as a public accounting firm and does not issue opinions on financial statements or offer attestation services. All registered trademarks are the property of their respective owners. Learn how to connect to these modules which are required for Office 365, SharePoint Online, and Skype for Business Online.
  • 8. © 2017 Protiviti Inc. An Equal Opportunity Employer M/F/Disability/Veterans. Protiviti is not licensed or registered as a public accounting firm and does not issue opinions on financial statements or offer attestation services. All registered trademarks are the property of their respective owners. $credential = Get-Credential Connect-MsolService -Credential $credential Simplest method to connect to Office 365 using PowerShell. Have access to easy-to-use cmdlets for Azure AD.
  • 9. © 2017 Protiviti Inc. An Equal Opportunity Employer M/F/Disability/Veterans. Protiviti is not licensed or registered as a public accounting firm and does not issue opinions on financial statements or offer attestation services. All registered trademarks are the property of their respective owners. $credential = Get-Credential $exchangeSession = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri "https://outlook.office365.com/powershell-liveid/" -Credential $credential -Authentication "Basic" –AllowRedirection Import-PSSession $exchangeSession Use any PowerShell module to run these cmdlets to connect and download cmdlets for Exchange Online Module for PowerShell.
  • 10. © 2017 Protiviti Inc. An Equal Opportunity Employer M/F/Disability/Veterans. Protiviti is not licensed or registered as a public accounting firm and does not issue opinions on financial statements or offer attestation services. All registered trademarks are the property of their respective owners. $credential = Get-Credential $siteUrl = “https://<O365TenantDomain>-admin.sharepoint.com)” Connect-SPOService -Url $siteUrl -credential $credential Use the SharePoint Online Management Shell and these cmdlets to connect to SharePoint Online Module for PowerShell.
  • 11. © 2017 Protiviti Inc. An Equal Opportunity Employer M/F/Disability/Veterans. Protiviti is not licensed or registered as a public accounting firm and does not issue opinions on financial statements or offer attestation services. All registered trademarks are the property of their respective owners. $UserCredential = Get-Credential $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.compliance.protection.outlook.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection Import-PSSession $Session Use any PowerShell module to run these cmdlets to connect and download cmdlets for the Security & Compliance Center.
  • 12. © 2017 Protiviti Inc. An Equal Opportunity Employer M/F/Disability/Veterans. Protiviti is not licensed or registered as a public accounting firm and does not issue opinions on financial statements or offer attestation services. All registered trademarks are the property of their respective owners. $UserCredential = Get-Credential $sfboSession = New-CsOnlineSession -Credential $credential Import-PSSession $sfboSession Use the Skype for Business Online Windows PowerShell Module and these cmdlets to connect to Skype for Business Online.
  • 13. © 2017 Protiviti Inc. An Equal Opportunity Employer M/F/Disability/Veterans. Protiviti is not licensed or registered as a public accounting firm and does not issue opinions on financial statements or offer attestation services. All registered trademarks are the property of their respective owners. Manage Azure AD using Windows PowerShell Exchange Online Cmdlets Windows PowerShell for SharePoint Online Cmdlets Office 365 Security & Compliance Center Cmdlets Skype for Business Online Cmdlets Check these references for more Office 365 PowerShell cmdlets.
  • 14. © 2017 Protiviti Inc. An Equal Opportunity Employer M/F/Disability/Veterans. Protiviti is not licensed or registered as a public accounting firm and does not issue opinions on financial statements or offer attestation services. All registered trademarks are the property of their respective owners. User and license management related cmdlets. Connect-MsolService Connect to your Office 365 Service. Get-MsolUser or Get-MsolUser | Select DisplayName, UsageLocation, UserPrincipalName Display list of users currently within your Office 365 tenant. Get-MsolUser –UnlicensedUsersOnly Display only list of users in your Office 365 tenant which do not have a license. Get-MsolAccountSku Displays your Office 365 tenant license SKU. Use this when assigning a license. Set-MsolUser -UserPrincipalName “<user’s upn>” -UsageLocation "US“ Set the location for a specific user by specifying the user principal name. Set-MsolUserLicense -UserPrincipalName " <user’s upn> " -AddLicenses “<your license SKU“ Set a license for the specified user. Use the SKU displayed by the command above. Get-MsolUser | Select DisplayName, UsageLocation, UserPrincipalName | Export-CSV –Path “c:myusers.csv” Gets a list of all users with specific attributes for each user, and outputs the list to a CSV file. • Combine Powershell commands to assign licenses to all unlicensed users Get-MsolUser -UnlicensedUsersOnly | Set-Msoluser - UsageLocation "US“ Get-MsolUser -UnlicensedUsersOnly | Set-MsolUserLicense -AddLicenses “<your license SKU>"
  • 15. © 2017 Protiviti Inc. An Equal Opportunity Employer M/F/Disability/Veterans. Protiviti is not licensed or registered as a public accounting firm and does not issue opinions on financial statements or offer attestation services. All registered trademarks are the property of their respective owners. User PowerShell to find out which cmdlets are available for a particular module. Get-Command Get-Command –Module msonline Get-Command -Module Microsoft.PowerShell.Security Get-Command | where {$_.ModuleName -eq "Microsoft.Online.SharePoint.PowerShell"} Help <name of the command>
  • 16. © 2017 Protiviti Inc. An Equal Opportunity Employer M/F/Disability/Veterans. Protiviti is not licensed or registered as a public accounting firm and does not issue opinions on financial statements or offer attestation services. All registered trademarks are the property of their respective owners. There are more available then you realize. There are 93 available today!
  • 17. Internal Audit, Risk, Business & Technology Consulting DEMONSTRATION Using PowerShell to Administer Office 365
  • 18. © 2017 Protiviti Inc. An Equal Opportunity Employer M/F/Disability/Veterans. Protiviti is not licensed or registered as a public accounting firm and does not issue opinions on financial statements or offer attestation services. All registered trademarks are the property of their respective owners. Learn PowerShell for Office 365 to become more efficient and access all the power of an Office 365 administrator! Efficiently perform bulk operations Features you can only configure using PowerShell Reveal info you cannot see in the Office 365 Admin Center Efficiently Filter, Save and Print Data Manage Office 365 Across Server Products
  • 19. Internal Audit, Risk, Business & Technology Consulting THANK YOU Antonio Maio Protiviti | Senior Enterprise Architect Microsoft Office Server and Services MVP Email: antonio.maio@protiviti.com Blog: www.trustsharepoint.com Slide share: http://www.slideshare.net/AntonioMaio2 Twitter: @AntonioMaio2