SlideShare a Scribd company logo
Office365 user admin_w_powershell
Office365 User Admin
with PowerShell
Thorbjørn Værp
Principal Consultant, Point Taken, Norway
– O365 UserAdmin w PS>
I love questions, raise a hand or tweet:
@vaerpn #ESPC16 Email: tv@pointtaken.no
Agenda
• #1 - Install some binaries
Agenda
• #1 - Install some binaries
• #2 - Load some modules
Agenda
• #1 - Install some binaries
• #2 - Load some modules
• #3 - Connect to Office 365
Agenda
• #1 - Install some binaries
• #2 - Load some modules
• #3 - Connect to Office 365
• #4 – Use PowerShell wisely [aka copy with pride  ]
Agenda
@vaerpn
#ESPC16
#1 Install some binaries
#1 Install some binaries,
MSOL Service Sign-In Assistant
• http://go.microsoft.com/fwlink/?LinkID=286152
#1 Install some binaries,
MSOL Service Sign-In Assistant
#1 – Azure AD PS Module
• http://social.technet.microsoft.com/wiki/contents/articles/28552.microsoft-azure-active-directory-powershell-module-version-release-history.aspx
#1 – Azure AD PS Module
#1 – Azure AD PS Module
#1 – Azure AD PS Module V2
• http://social.technet.microsoft.com/wiki/contents/articles/28552.microsoft-azure-active-directory-powershell-module-version-release-history.aspx
Released
october 2016
• https://www.powershellgallery.com/packages/AzureADPreview/2.0.0.17
#1 – Azure AD PS Module V2
#1 – Azure AD PS Module V2
#1 – Azure AD PS Module V2
#1 – Install SPO Management Shell
• https://www.microsoft.com/en-us/download/details.aspx?id=35588
#1 – Install SPO Management Shell
#1 – Install Skype for Business Online,
Windows PowerShell Module
• https://www.microsoft.com/en-us/download/details.aspx?id=39366
#1 – Install Skype for Business Online,
Windows PowerShell Module
#1 – Install
SharePointPnPPowerShellOnline
https://github.com/OfficeDev/PnP-PowerShell
Demo
@vaerpn
#ESPC16
#2 - Load some modules
#2 - Load some modules
• Run PS ISE as Administrator
• Create the ISE Profile
#2 - Load some modules
• Edit the PowerShell ISE Profile file
• Powershell_ise.exe $profile
#2 - Load some modules
• Update the help files, get-help will install it at first run.
• Update-help periodically
#2 - Load some modules –
Connect to all
https://technet.microsoft.com/en-us/library/dn568015.aspx
• A lot of tips are available at TechNet
• Or in the Community
#2 Load some modules
– Verify
Get-Module | Select-Object Name, Path | FL
Demo
@vaerpn
#ESPC16
#3. Connect to Office365
– MSOLService
#3. Connect to Office365
– MSOLService
• Log on with the global admin user
#3 - Connect to -> SPO
#3 Connect to -> Exchange
Remember to Disconnect!
#3 Connect to -> Skype
• Same as Exchange with a twist
#3 Connect to -> Security &
Compliance Center
Demo
@vaerpn
#ESPC16
#4 Use it
#4 Use it, execute and edit
• You must use PS ISE Admin elevated!
• Excel .csv or .XML files as input
#4 Use it -> MSDN PS community
https://msdn.microsoft.com/en-us/powershell/mt173057.aspx
#4 Use it
-> SP Command Builder
https://www.microsoft.com/resources/TechNet/en-
us/Office/media/WindowsPowerShell/WindowsPowerShellCommandBuilder.html
#4 Use it ->Script Center
https://gallery.technet.microsoft.com/scriptcenter/site/search?f%5B0%5D.Type
=RootCategory&f%5B0%5D.Value=Office365
https://dev.office.com/patterns-and-practices
https://github.com/OfficeDev/PnP-PowerShell
#4 Use it
-> Pattern & Pracices
#4 Use it ->the Disclaimer
No animals was harmed during the making of these scipts! 
Feel free to copy with pride any scripts you might find usefull,
but it’s all at your own risk!
I encourage you to test thoroughly on a trial/dev O365 tenant.
Live Long and Prosper! 
@vaerpn
Demo
@vaerpn
#ESPC16
WrapUp – What we did
• #1 - Install some binaries
• #2 - Load some modules
• #3 - Connect to Office 365
• #4 – Use PowerShell wisely [aka copy with pride  ]
• #1 - Install some binaries
• #2 - Load some modules
• #3 - Connect to Office 365
• #4 – Use PowerShell wisely [aka copy with pride  ]
WrapUp – What we did
• #1 - Install some binaries
• #2 - Load some modules
• #3 - Connect to Office 365
• #4 – Use PowerShell wisely [aka copy with pride  ]
WrapUp – What we did
• #1 - Install some binaries
• #2 - Load some modules
• #3 - Connect to Office 365
• #4 – Use PowerShell wisely [aka copy with pride  ]
WrapUp – What we did
• #1 - Install some binaries
• #2 - Load some modules
• #3 - Connect to Office 365
• #4 – Use PowerShell wisely [aka copy with pride  ]
WrapUp – What we did
WrapUp
– What we REALLY did
Added Randy -and a heck lot of other users
to the users.csv Excel file.
Foreach object with PS we gave them
UPN, License, Department ++ For Randy
the Department=Kristiansand
1
WrapUp
– What we REALLY did
Added Randy -and a heck lot of other users
to users.csv file. Foreach object with PS we
gave them UPN, License, Department ++
For Randy the Department=Kristiansand
We added Randy -and selected other users
to the Exchange Security Enabled
Distribution Group «DonkeyKongs»
The MailEnabled sec. group was allready
nested in «ESPC16»-SPOSiteGroup
1
2
In Exchange Online we created a dynamic
distribution rule with the email
espc16@espc16.onmicrosoft.com , and the
rule department=Kristiansand..
@vaerpn
#ESPC16
Remember to visit the sponsors
and rate this session

More Related Content

PPTX
Compliance Automation with InSpec
PPTX
Achieving DevOps Success with Chef Automate
PPTX
Compliance Automation with Inspec Part 1
PDF
PDF
Micro Services - Small is Beautiful
PPTX
Continous integration and delivery for single page applications
PPTX
Apache Flink First Half of 2015 Community Update
PDF
Spring Boot
Compliance Automation with InSpec
Achieving DevOps Success with Chef Automate
Compliance Automation with Inspec Part 1
Micro Services - Small is Beautiful
Continous integration and delivery for single page applications
Apache Flink First Half of 2015 Community Update
Spring Boot

What's hot (20)

PPTX
Deploying IIS and ASP.NET with Puppet
PDF
Software Architecture for DevOps and Continuous Delivery
PDF
Micro Services - Smaller is Better?
PPTX
Test Automation using Athena by OLX - Intro
PPTX
Flink Community Update April 2015
PPTX
Understanding the CloudStack Release Process
PDF
SQL Server PowerShell - Community Tools
PDF
KKBOX WWDC17 Security - Antony
PDF
ELK Stack
PPTX
Apache Flink - Community Update January 2015
PPTX
DevCon 2018 - 5 ways to use AWS with Alfresco
PDF
External Master Data in Alfresco: Integrating and Keeping Metadata Consistent...
PPTX
Developer day - AWS: Fast Environments = Fast Deployments
PDF
Micro Services - Neither Micro Nor Service
PPTX
RavenDB 3.0 Keynote
PPTX
Effective Testing with Ansible and InSpec
PDF
Continuous Delivery and Micro Services - A Symbiosis
PDF
Bay Area Chef Meetup February
PDF
Micro Service – The New Architecture Paradigm
PPTX
Continuous Delivery using AWS CodePipeline, AWS Lambda & AWS ElasticBeanstalk
Deploying IIS and ASP.NET with Puppet
Software Architecture for DevOps and Continuous Delivery
Micro Services - Smaller is Better?
Test Automation using Athena by OLX - Intro
Flink Community Update April 2015
Understanding the CloudStack Release Process
SQL Server PowerShell - Community Tools
KKBOX WWDC17 Security - Antony
ELK Stack
Apache Flink - Community Update January 2015
DevCon 2018 - 5 ways to use AWS with Alfresco
External Master Data in Alfresco: Integrating and Keeping Metadata Consistent...
Developer day - AWS: Fast Environments = Fast Deployments
Micro Services - Neither Micro Nor Service
RavenDB 3.0 Keynote
Effective Testing with Ansible and InSpec
Continuous Delivery and Micro Services - A Symbiosis
Bay Area Chef Meetup February
Micro Service – The New Architecture Paradigm
Continuous Delivery using AWS CodePipeline, AWS Lambda & AWS ElasticBeanstalk
Ad

Similar to Office365 user admin_w_powershell (20)

PPTX
Office 365 Useradmin with PowerShell
PPTX
Profiling and Tuning a Web Application - The Dirty Details
PPTX
SharePoint Saturday Belgium 2014 SharePoint Upgrade, real life experience and...
PPTX
SPSBE14 SPSBE02 SharePoint Upgrade reel life experience, best practices
PDF
DevOps and Decoys How to Build a Successful Microsoft DevOps Including the Data
PPTX
SPS Dubai Best Practice upgrading SharePoint from 2007/2010 to 2013 and 2013 SP1
PPTX
Developer Night - Opticon18
PPTX
Adding Security and Compliance to Your Workflow with InSpec
PPTX
Release Management with Visual Studio Team Services and Office Dev PnP
PPTX
Microsoft Teams & nyheter Januar 2018
PPTX
Dev Ops for systems of record - Talk at Agile Australia 2015
PPTX
Splunk: Forward me the REST of those shells
PDF
O365con14 - migrating your e-mail to the cloud
PPTX
Trusting the Unknown
PPTX
Trusting the Unknown
PPT
Integration Services Presentation
PPT
Integration Services Presentation V2
PPTX
My personal story from azure it pro to azure dev ops
PPTX
BrainQuest-DevOps
PDF
Angular 2 overview in 60 minutes
Office 365 Useradmin with PowerShell
Profiling and Tuning a Web Application - The Dirty Details
SharePoint Saturday Belgium 2014 SharePoint Upgrade, real life experience and...
SPSBE14 SPSBE02 SharePoint Upgrade reel life experience, best practices
DevOps and Decoys How to Build a Successful Microsoft DevOps Including the Data
SPS Dubai Best Practice upgrading SharePoint from 2007/2010 to 2013 and 2013 SP1
Developer Night - Opticon18
Adding Security and Compliance to Your Workflow with InSpec
Release Management with Visual Studio Team Services and Office Dev PnP
Microsoft Teams & nyheter Januar 2018
Dev Ops for systems of record - Talk at Agile Australia 2015
Splunk: Forward me the REST of those shells
O365con14 - migrating your e-mail to the cloud
Trusting the Unknown
Trusting the Unknown
Integration Services Presentation
Integration Services Presentation V2
My personal story from azure it pro to azure dev ops
BrainQuest-DevOps
Angular 2 overview in 60 minutes
Ad

More from Thorbjørn Værp (20)

PPTX
Lag ditt eget Viva Learning innhold
PPTX
Frokostseminar 25.november 2020
PPTX
Office 365 UGA Siste nytt september 2020
PPTX
Office 365 User Group Agder Meetup January 2020
PPTX
Office365 User Group Agder Meetup mai 2019
PPTX
SPS Leicester 2018 hub sites
PPTX
SPS Milan 2018 hub sites
PPTX
SharePoint hub sites in Office 365
PPTX
Office 365 User Group Agder Meetup Mai 2018
PPTX
Office 365 User Groupa Agder - Siste nytt februar 2018
PPTX
GDPR presentation Tomas Sunde NCG
PPTX
O365 UGA - Siste nytt November
PPTX
Team Me Up Scotty SPSOslo w.Extending
PPTX
OCAD løypelegging
PPTX
Team Me Up with Microsoft Teams
PPTX
SPSMilano - Microsoft Teams
PPTX
Team me up Scotty!
PPTX
Team me up scotty!
PPTX
O365 UserGroup Agder meetup march
PPTX
Implementing Office Online Server
Lag ditt eget Viva Learning innhold
Frokostseminar 25.november 2020
Office 365 UGA Siste nytt september 2020
Office 365 User Group Agder Meetup January 2020
Office365 User Group Agder Meetup mai 2019
SPS Leicester 2018 hub sites
SPS Milan 2018 hub sites
SharePoint hub sites in Office 365
Office 365 User Group Agder Meetup Mai 2018
Office 365 User Groupa Agder - Siste nytt februar 2018
GDPR presentation Tomas Sunde NCG
O365 UGA - Siste nytt November
Team Me Up Scotty SPSOslo w.Extending
OCAD løypelegging
Team Me Up with Microsoft Teams
SPSMilano - Microsoft Teams
Team me up Scotty!
Team me up scotty!
O365 UserGroup Agder meetup march
Implementing Office Online Server

Recently uploaded (20)

PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PPTX
Spectroscopy.pptx food analysis technology
PDF
Empathic Computing: Creating Shared Understanding
PDF
KodekX | Application Modernization Development
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Approach and Philosophy of On baking technology
PPTX
Big Data Technologies - Introduction.pptx
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Encapsulation_ Review paper, used for researhc scholars
PPTX
sap open course for s4hana steps from ECC to s4
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Agricultural_Statistics_at_a_Glance_2022_0.pdf
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
Digital-Transformation-Roadmap-for-Companies.pptx
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Spectroscopy.pptx food analysis technology
Empathic Computing: Creating Shared Understanding
KodekX | Application Modernization Development
Chapter 3 Spatial Domain Image Processing.pdf
Spectral efficient network and resource selection model in 5G networks
Approach and Philosophy of On baking technology
Big Data Technologies - Introduction.pptx
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Per capita expenditure prediction using model stacking based on satellite ima...
Programs and apps: productivity, graphics, security and other tools
Diabetes mellitus diagnosis method based random forest with bat algorithm
Encapsulation_ Review paper, used for researhc scholars
sap open course for s4hana steps from ECC to s4
Review of recent advances in non-invasive hemoglobin estimation
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...

Office365 user admin_w_powershell

  • 2. Office365 User Admin with PowerShell Thorbjørn Værp Principal Consultant, Point Taken, Norway
  • 3. – O365 UserAdmin w PS> I love questions, raise a hand or tweet: @vaerpn #ESPC16 Email: tv@pointtaken.no
  • 4. Agenda • #1 - Install some binaries
  • 5. Agenda • #1 - Install some binaries • #2 - Load some modules
  • 6. Agenda • #1 - Install some binaries • #2 - Load some modules • #3 - Connect to Office 365
  • 7. Agenda • #1 - Install some binaries • #2 - Load some modules • #3 - Connect to Office 365 • #4 – Use PowerShell wisely [aka copy with pride  ]
  • 9. #1 Install some binaries
  • 10. #1 Install some binaries, MSOL Service Sign-In Assistant • http://go.microsoft.com/fwlink/?LinkID=286152
  • 11. #1 Install some binaries, MSOL Service Sign-In Assistant
  • 12. #1 – Azure AD PS Module • http://social.technet.microsoft.com/wiki/contents/articles/28552.microsoft-azure-active-directory-powershell-module-version-release-history.aspx
  • 13. #1 – Azure AD PS Module
  • 14. #1 – Azure AD PS Module
  • 15. #1 – Azure AD PS Module V2 • http://social.technet.microsoft.com/wiki/contents/articles/28552.microsoft-azure-active-directory-powershell-module-version-release-history.aspx Released october 2016
  • 17. #1 – Azure AD PS Module V2
  • 18. #1 – Azure AD PS Module V2
  • 19. #1 – Install SPO Management Shell • https://www.microsoft.com/en-us/download/details.aspx?id=35588
  • 20. #1 – Install SPO Management Shell
  • 21. #1 – Install Skype for Business Online, Windows PowerShell Module • https://www.microsoft.com/en-us/download/details.aspx?id=39366
  • 22. #1 – Install Skype for Business Online, Windows PowerShell Module
  • 25. #2 - Load some modules
  • 26. #2 - Load some modules • Run PS ISE as Administrator • Create the ISE Profile
  • 27. #2 - Load some modules • Edit the PowerShell ISE Profile file • Powershell_ise.exe $profile
  • 28. #2 - Load some modules • Update the help files, get-help will install it at first run. • Update-help periodically
  • 29. #2 - Load some modules – Connect to all https://technet.microsoft.com/en-us/library/dn568015.aspx • A lot of tips are available at TechNet • Or in the Community
  • 30. #2 Load some modules – Verify Get-Module | Select-Object Name, Path | FL
  • 32. #3. Connect to Office365 – MSOLService
  • 33. #3. Connect to Office365 – MSOLService • Log on with the global admin user
  • 34. #3 - Connect to -> SPO
  • 35. #3 Connect to -> Exchange Remember to Disconnect!
  • 36. #3 Connect to -> Skype
  • 37. • Same as Exchange with a twist #3 Connect to -> Security & Compliance Center
  • 40. #4 Use it, execute and edit • You must use PS ISE Admin elevated! • Excel .csv or .XML files as input
  • 41. #4 Use it -> MSDN PS community https://msdn.microsoft.com/en-us/powershell/mt173057.aspx
  • 42. #4 Use it -> SP Command Builder https://www.microsoft.com/resources/TechNet/en- us/Office/media/WindowsPowerShell/WindowsPowerShellCommandBuilder.html
  • 43. #4 Use it ->Script Center https://gallery.technet.microsoft.com/scriptcenter/site/search?f%5B0%5D.Type =RootCategory&f%5B0%5D.Value=Office365
  • 45. #4 Use it ->the Disclaimer No animals was harmed during the making of these scipts!  Feel free to copy with pride any scripts you might find usefull, but it’s all at your own risk! I encourage you to test thoroughly on a trial/dev O365 tenant. Live Long and Prosper!  @vaerpn
  • 47. WrapUp – What we did • #1 - Install some binaries • #2 - Load some modules • #3 - Connect to Office 365 • #4 – Use PowerShell wisely [aka copy with pride  ]
  • 48. • #1 - Install some binaries • #2 - Load some modules • #3 - Connect to Office 365 • #4 – Use PowerShell wisely [aka copy with pride  ] WrapUp – What we did
  • 49. • #1 - Install some binaries • #2 - Load some modules • #3 - Connect to Office 365 • #4 – Use PowerShell wisely [aka copy with pride  ] WrapUp – What we did
  • 50. • #1 - Install some binaries • #2 - Load some modules • #3 - Connect to Office 365 • #4 – Use PowerShell wisely [aka copy with pride  ] WrapUp – What we did
  • 51. • #1 - Install some binaries • #2 - Load some modules • #3 - Connect to Office 365 • #4 – Use PowerShell wisely [aka copy with pride  ] WrapUp – What we did
  • 52. WrapUp – What we REALLY did Added Randy -and a heck lot of other users to the users.csv Excel file. Foreach object with PS we gave them UPN, License, Department ++ For Randy the Department=Kristiansand 1
  • 53. WrapUp – What we REALLY did Added Randy -and a heck lot of other users to users.csv file. Foreach object with PS we gave them UPN, License, Department ++ For Randy the Department=Kristiansand We added Randy -and selected other users to the Exchange Security Enabled Distribution Group «DonkeyKongs» The MailEnabled sec. group was allready nested in «ESPC16»-SPOSiteGroup 1 2 In Exchange Online we created a dynamic distribution rule with the email espc16@espc16.onmicrosoft.com , and the rule department=Kristiansand..
  • 54. @vaerpn #ESPC16 Remember to visit the sponsors and rate this session

Editor's Notes

  • #3: To add your image, first delete the place holder image as shown in the white box. Then insert your picture and scale it to be bigger than the size of the white box shown. Finally, right click on your image and select ‘Send to back’ – your image should now be framed correctly.
  • #11: This is version 7 X from 2014, It’s the newest one as far as I know. TIP: Search MS Download and sort by date.
  • #13: How can I determine what version of AAD PowerShell I have? You can run the get-item cmdlet to check the version of the DLL files of the module that you have currently installed: (get-item C:\Windows\System32\WindowsPowerShell\v1.0\Modules\MSOnline\Microsoft.Online.Administration.Automation.PSModule.dll).VersionInfo.FileVersion
  • #14: Determine
  • #16: How can I determine what version of AAD PowerShell I have? You can run the get-item cmdlet to check the version of the DLL files of the module that you have currently installed: (get-item C:\Windows\System32\WindowsPowerShell\v1.0\Modules\MSOnline\Microsoft.Online.Administration.Automation.PSModule.dll).VersionInfo.FileVersion
  • #17: How can I determine what version of AAD PowerShell I have? You can run the get-item cmdlet to check the version of the DLL files of the module that you have currently installed: (get-item C:\Windows\System32\WindowsPowerShell\v1.0\Modules\MSOnline\Microsoft.Online.Administration.Automation.PSModule.dll).VersionInfo.FileVersion
  • #27: Create the ISE profile if (!(test-path $profile )) {new-item -type file -path $profile -force} Import modules Set-ExecutionPolicy unrestricted (or remote signed)
  • #28: Powershell_ise.exe $profile
  • #43: There are some getting started cmdlets for SPO here.