What email address or phone number would you like to use to sign in to Docs.com?
If you already have an account that you use with Office or other Microsoft services, enter it here.
Or sign in with:
Signing in allows you to download and like content, and it provides the authors analytical data about your interactions with their content.
Embed code for: Scripting SharePoint 2016 Tasks with PowerShell
Select a size
Scripting SharePoint 2016 Tasks with PowerShell - My Presentation from SP Live 360 in Orlando, 2016
Scripting SharePoint 2016 Tasks with PowerShell
Owner and Consultant at Intelligink
Trainer for Opsgility
10 Years of SharePoint Experience
5 Years of Office 365 Experience
Ran the SharePoint Users Group in Jacksonville, FL for 5 Years
Helped start the Cloud Users Group in Jacksonville, FL this year.
About this Presentation
Assumption is that you have some experience with PowerShell
We will cover
Changes with SharePoint 2016
Tasks you can Automate with PowerShell to save a lot of time
Using PowerShell for reporting on your SharePoint environment
What’s New Different with SharePoint 2016?*
*November 2016 CU for SP2013 and SP 2016
What’s Been Added?
What’s Been Removed?
SPEdu cmdlets removed
45 SPProject Additions
Some “hidden” changes with modified cmdlet parameters
6 other Categories of cmdlets
11 miscellaneous cmdlets
Reason to Automate with PowerShell
Installation, Provisioning Sites, Updating
Write Once, Use Numerous Times
Tools and Resources
Visual Studio Code
PowerShell for SharePoint Command Builder
Not updated for SharePoint 2016
33 Cmdlets removed are SPEdu and Excel
832 SharePoint Cmdlets
SP Web Template/SP Site Master
Fast Site Collection Create
Create Site by copying the Site Collection at the Database Level
Only be used with OOTB Site Templates*
SP Site Map
During the beta there were additional parameters to the new-spconfigurationdatabase cmdlet that allowed you to create the site map database – these disappeared with the RTM and so did the database and my guess is they just didn’t remove the cmdlets. There are internal methods to provision the database and it appears to be used by a ton of code to access site collections if the db is present (guessing it’s used for large farms where you have site collections spread over lots and lots of databases and you want a quick way to access the information without storing it in the configuration database so my guess is it’s a performance thing that they introduced for O365 but didn’t fully bake into on-prem). I’m sure there’s a way to get the DB created by calling some method or cmdlet but I couldn’t find one outside of using reflection.
If you want to see the schema of the DB that would get created it’s here: C:\Program Files\Common Files\microsoft shared\Web Server Extensions\16\TEMPLATE\SQL\sitemapdb.sql – you can get a pretty good idea of what it’s purpose is by looking at it.
SP Access Services
Import and Export an Access Services Database. These can be used to move the Access Services database to a new SQL Server
Get-SPAppStoreWebServiceConfiguration - https://technet.microsoft.com/en-us/library/mt667915(v=office.16).aspx
Set-SPAppStoreWebServiceConfiguration - https://technet.microsoft.com/en-us/library/mt667916(v=office.16).aspx
Move-SPAppManagementData – not documented …at all
Upgrade-SPAppManagementServiceApplication – not documented …at all
These cmdlets can be used to view the status of the SharePoint Service App Services as well as to start/stop them as well as view/set various service properties
Get-SPMicroFeedOptions: Get’s the cache feed settings from the User Profile Application Proxy
Set-SPMicroFeedOptions: Set “rules” for the Microfeed. Things like MaxMentions, MaxPostLength and MaxTags
Copy-SPSideBySideFiles : Copy SideBySide files when using PowerShell script in zero downtime patching instead of PSConfig.exe . Or if PSConfig.exe fails on the SiteBySide copy, you can use the cmdlet to do it.
If the update process fails for any reason, you can run the Copy-SPSideBySideFiles cmdlet to restore the state of the update. For additional information about Side by Side files, see Copy-SPSideBySideFiles.
You should enable the side-by-side file copy process before you Upgrade. Running in side-by-side ensures that all the web front ends in the farm serve the same static content during the upgrade, even if static files on a given WFE are being upgraded or replaced.
Remove-SPCentralAdministration : Remove CA from the local server
Merge-SPUsageLog : Gather information from the Usage Log across the entire farm. Can filter and aggregate logs based on specific information
Export-SPTagsAndNotesData : Export the Tags and notes from the SharePoint NewsFeed to a .zip file. Tags and Notes are written into two separate files .
Get-SPConnectedServiceApplicationInformation : Get’s the health of a service application proxy
Get-SPInsightsConfig : returns the uploader.xml and dataloader.exe.config from configuration database. Then you can make updates to the xml and apply the updates.
This is used in a SharePoint Hybrid Auditing
Migrate-SPDatabase : No Documentation, Appears to be able to be used to migrated SP2013 Databases to SP2016 (both Service Application DBs as well as maybe content databases)
Reset-SPSites : Performs a Sync of the content databasea nd config database. Make sure all sites in Content DB are in Config and all Site collectsion on Config DB actually exist in the content DB
Set-SPDefaultProfileConfig : Sets the MySitesPublicEnabled property to true or false
Set-SPServer : Set’s the role of the SharePoint Server (think minrole )
Upgrade-SPProfileServiceApplication : Upgrades the User Profile Service Application
SharePoint DNS is hosted by Microsoft, you can’t change the URL of SharePoint to anything other than [tenant].sharepoint.com – these disappeared with the RTM and so did the database and my guess is they just didn’t remove the cmdlets. There are internal methods to provision the database and it appears to be used by a ton of code to access site collections if the db is present (guessing it’s used for large farms where you have site collections spread over lots and lots of databases and you want a quick way to access the information without storing it in the configuration database so my guess is it’s a performance