Download presentation
Presentation is loading. Please wait.
1
State of the SharePoint PowerShell nation, 2017
11/12/2018 4:15 AM THR2060 State of the SharePoint PowerShell nation, 2017 Spencer Harbar Enterprise Architect © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
2
Agenda Common approaches to PowerShell for SharePoint
Core priniciples of PowerShell SharePoint Considerations Introduction to re-usable Tooling Desired State Configuration Worked example for SharePoint Other techniques to consider Summary
3
Common Approaches to PowerShell for SharePoint
4
Typical SharePoint PowerShell “Snippets”
Part 1 Part 2 Part 3 Part 4 Typical SharePoint PowerShell “Snippets”
5
Typical SharePoint PowerShell “Snippets”
Part 1 Part 2 Part 3 Part 4 Typical SharePoint PowerShell “Snippets”
6
AutoSPInstaller SPAuto AutoSPDeploy SPModule etc Über scripts
7
Adhoc Scripting Automation versus Productivity
Absolutely imperative to understand what a script does! And how it does it The devil is always in the detail! Not everything can be done with a cmdlet Bugs and issues with SharePoint cmdlets and/or management APIs
8
Focus on Initial Deployment
Installing and configuring farm(s) is simply the beginning Operational Management over the deployment lifecycle is way more important than building out a farm Does operations have familiarity with key components? Or are they merely executing scripts provided to them?
9
Core Principles of PowerShell
10
Windows PowerShell Principles
One could figure out all scenarios and implement solutions for them However, scenarios change! The world, especially the SharePoint world can be a messy place Think… Type… Get What each customer thinks/wants is different
11
Compositional Management
For example, Add a User Many, many variables Each customer’s process will be different “The whole is greater than the sum of its parts” Aristotle It’s not about understanding a bunch of cmdlets But how to use them together to deliver automation solutions
12
It’s all about a Toolbox
Allows for easy creation of solutions to scenarios Different Tools for different jobs Modular, reusable Become a tool maker rather than a “tool” an adhoc scripter solving immediate problems The time invested will pay off over the medium term Allowing you to make better use of your time and skills Allows you to learn much more Can be used across other products Any skills investment targeting On Premises will be valuable elsewhere
13
SharePoint considerations
14
Working on it… Originally built 2007-2009 It’s a Snap-in, not a module
No xcopy, no dynamic discovery, slow to load Inconsistent naming, inconsistent parameters Incorrect handling of optional parameters and Nulls Incorrect handling of switch parameters “Missing” cmdlets Major bugs Significant dependencies
15
Working on it… Missing playbook
Most elements are simply shims for legacy management APIs Most elements entirely devoid of remoting principles All the non-SharePoint work needed when operating a SharePoint farm AD, DNS, SQL, Network Stack, NLB, SQL Server etc Bottom line: It’s a legacy implementation, we need to provide the “toolbox”
16
Management APIs mean… Order of provisioning The missing playbook
will change steps required in many cases Impacts permissions and inheritance The missing playbook the definition of what must be done in a given situation Sometimes also known as documentation
17
Playbook Example The Distributed Cache service account change…
must be performed using Windows PowerShell must be performed on a server which runs Distributed Cache must take place on a server with the Distributed Cache service running For new SharePoint 2013 farms, the service account should be changed after deploying the first Distributed Cache server, and before deploying the additional Distributed Cache servers must take place when only a single server is in the Cache Cluster will result in data loss as all cache hosts must be removed requires that any cache size configuration be re-applied For new SharePoint 2016 farms, the service account should be changed after farm creation, and before deploying any Distributed Cache servers
18
Playbook Example Show PowerShell module….
19
Playbook Example Install-Module -Name SharePointDistributeCache
20
Desired State Configuration
The preferred model for PowerShell automation across the stack The “make it so” engine Ensure initial deployment and operational state SharePoint DSC Resources are a quality implementation, but… focus on initial deployment Many elements of SharePoint do not allow the full DSC implementation Enforces a deployment approach Additional infrastructure requirements Most issues are not the resources but the back end management APIs
21
SharePoint / Office 365 PnP PowerShell CmdLets
Library of PowerShell Cmdlets for provisioning and artifact management Leverages CSOM On Premises and Office 365
22
“Workpads” Many customers invest in building a “workpad”
Working set of common routines and utilities which avoid risks of adhoc scripting Which combine together the variety of approaches discussed
23
11/12/2018 4:15 AM Simple Workpad © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
24
Summary SharePoint’s management APIs and legacy PowerShell implementation prevents a “step change” in automation solutions Become a tool maker rather than a “tool” Remember the core principal of PowerShell – compositional management Invest in building a “toolkit” for common administration tasks Understand the “quirks” of SharePoint Stay current with PowerShell platform capabilities Feedback to Microsoft on what needs fixed
26
Please evaluate this session
Tech Ready 15 11/12/2018 Please evaluate this session From your Please expand notes window at bottom of slide and read. Then Delete this text box. PC or tablet: visit MyIgnite Phone: download and use the Microsoft Ignite mobile app Your input is important! © 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
27
11/12/2018 4:15 AM © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
28
11/12/2018 4:15 AM © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.