220 likes | 255 Views
Learn to automate SharePoint tasks, manage users, and ensure security using PowerShell in the Office 365 Cloud environment. Discover the power of PnP PowerShell for efficient provisioning and management.
E N D
PowerShell + SharePoint Online – An Admins Guide to Administration in the O365 Cloud Marrell Sanders – Sr. SharePoint Administrator NACS Branson, MO | March 14, 2019
Who Am I Marrell Sanders, MCTS • Senior Level Techie Contact • Email: techrevmarrell@outlook.com • Blog: www.techrevmarrell.com • Twitter: @TechRevMarrell
Get Drink Tickets and Wristband During Closing Session Thursday
Win a Surface Book courtesy of Microsoft! Play Vendor Bingo, Winner drawn during closing session on Friday
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 VM • Security with Automated and Remote Scripting
SharePoint Admin RoleWhat happened to it? Remember the good old days of SharePoint Administration? MOSS 2007 SharePoint 2010 or 2013? Huge Server Farms
Todd Klindtand Shane Young predicted the collapse of the “old ways” of the SharePoint Administrators. “The Old Admin Ways Must End”
Microsoft said a long time ago, ya know who can run a SharePoint farm better than us?
Learn a new skill Time to become a Developer….. Sort of, but not really, but kinda.
What is PowerShell? • PowerShell is an object-oriented programming language and interactive command line shell for Microsoft Windows. • #POSH • #PowerShell
Use the Force Oh Wait… I can’t logon to an o365 tenant server
What tools do we have? SPO Service Connect-PNP And a bunch of others
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/
PnP VS SPO? • PnP PowerShell Cmdlets contains additional parameters to each command, which is used to achieve more tasks when compared to equivalent SPO command. • PnP PowerShell Cmdlets managed by Patterns and Practices team and it gets updated every month. Where as SPO cmdlets are windows PowerShell module to manage the SharePoint Online and this also get frequent updates. • PnP PowerShell Cmdlets works in the context of the current user, where as SPO command runs with the Tenant Admin rights. • PnP PowerShell Cmdlets connects to the Site Collection level, where as SPO has the commands to target Tenant level.
Context Switching Connect-PnPOnline -Url $siteAurl -Credentials $credentials $ctx = Get-PnPContext Get-PnPList# returns the lists from site specified with $siteAurlConnect-PnPOnline-Url $siteBurl -Credentials $credentialsGet-PnPList# returns the lists from the site specified with $siteBurl Set-PnPContext-Context $ctx# switch back to site A Get-PnPList# returns the lists from site A
Shameless Plug for Vlad https://www.amazon.com/Essential-PowerShell-Office-365-Productivity/dp/1484231287
Resource Links https://github.com/SharePoint/PnP-PowerShell/wiki/How-to-use-the-Windows-Credential-Manager-to-ease-authentication-with-PnP-PowerShellhttps://laurakokkarinen.com/my-most-used-powershell-scripts-for-managing-sharepoint-online/ https://absolute-sharepoint.com/2018/03/create-a-report-of-sharepoint-online-external-users-with-powershell.html https://www.amazon.com/Essential-PowerShell-Office-365-Productivity/dp/1484231287