Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Â
PowerShell + SharePoint Online - An Admin's Guide
1. PowerShell + SharePoint Online
â An Admins Guide to
Administration in the O365 Cloud
Marrell Sanders â Sr. SharePoint Administrator
ShareCloud Summit Dallas, TX | May 2nd, 2018
2. Who Am I
Marrell Sanders, MCTS
ï” Senior SharePoint Administrator
Loveâs Travel Stops and Country Stores
ï” MS Group IT
Contact
ï” Email: techrevmarrell@outlook.com
ï” Blog: www.techrevmarrell.com
ï” Twitter: @TechRevMarrell
3. Key Takeaways
ï” Whatâs new with PoSh for SPO
ï” How to manage sites, users, groups with O365 PowerShell
ï” Automate Business Scenarios with PowerShell
ï” Scheduling Tasks using Azure
ï” Security with Automated and Remote Scripting
ï” The Top Ten cmdlets SP Admins will use
4. SharePoint Admin Role
What happened to it?
Remember the good old days of SharePoint Administration?
MOSS 2007
SharePoint 2010 or 2013?
Huge Server Farms
5. Todd Klindt and Shane Young predicted the collapse of
the âold waysâ of the SharePoint Administrators.
âThe Old Admin Ways Must Endâ
6. Microsoft said a long time ago, ya know
who can run a SharePoint farm better
than us?
9. Learn a new skill
Time to become a DeveloperâŠ.. Sort
of, but not really, but kinda.
10. What is PowerShell?
ï” PowerShell is an object-oriented
programming language and
interactive command line shell for
Microsoft Windows.
ï” #POSH
ï” #PowerShell
11. Use the Force
Oh WaitâŠ
I canât logon to an o365 tenant server
13. What tools do we have?
Azure AD
SPO Service
MS Teams
14. What tools do we have?
Azure AD
install-module âName AzureAD
SPO Service
Connect-SPOService âurl https://tenant-admin.sharePoint.com
MS Teams
Connect-MicrosoftTeams âurl https://tenant.sharePoint.com
19. What is CSOM
Client Side Object Model
We need to include the Client Object Model Libraries into our Scripts.
https://www.nuget.org/packages/Microsoft.SharePointOnline.CSOM
23. PnP PowerShell
SharePoint Patterns and Practices (PnP) contains a
library of PowerShell commands (PnP PowerShell)
that allows you to perform complex provisioning and
artifact management actions towards SharePoint.
The commands use CSOM and can work against both
SharePoint Online as SharePoint On-Premises.
https://docs.microsoft.com/en-
us/powershell/sharepoint/sharepoint-
pnp/sharepoint-pnp-cmdlets?view=sharepoint-ps
24. PnP PowerShell
Connect-PnPOnline âurl -credentials (Get-Credential)
Get-Command -Module *PnP*
Get-PnPMasterPage
Set-PnPMasterPage
Check In File
Whoâs a site collection admin on the site.
26. My Top 10
1. Get-SPOSite
2. New-SPOSite
3. Remove-SPOSite
4. Get-allsubsites in Sitecollection
5. Get-AllSubsites and Site Collections
in Farm
6. Everything in sharePont PnP
7. Scheduled Task from Azure
8. Import into List
9. Create Multiple Site Collections
10. Restore-SPODeletedSite
http://techrevmarrell.com/SPOTop10