Start-SPPowerShell – Introduction to PowerShell for SharePoint Admins and Developers Paul BAker
The IT Pro Track is proudly sponsored by Visit their booth for a free 1 Year license of their Fusion data migration software and to schedule free training!
About Me… Former Trainer / Consultant with SharePoint Working with SharePoint since SharePoint 2007 Working for Boys Town as SharePoint Developer / Architect http://www.Boystown.org http://www.boystownhospital.org http://www.boystownpediatrics.org http://www.yourlifeyourvoice.org
Outline What is PowerShell? Why learn PowerShell? SharePoint + PowerShell 101 Real Life SharePoint and PowerShell Getting Started - Investigating Site Collections and Sites Using the Object Model – Uploading Backup Logs Manipulating Service Applications – User Profile Service Generating a Sitemap.xml file for Internet Facing Sites and Search Engines Replacing Custom Timer Jobs
What is PowerShell? Scripting Language for Windows Operating Systems A .NET Based Command Prompt .NET Command Line Execution Environment An Interface into Microsoft Software Platforms and Modules SharePoint has a PowerShell Library Built for it Exchange Active Directory SQL Server
Why Learn PowerShell? It is here to stay PowerShell first, then Interface Not everything can be done through the user interface SharePoint 2013 Search Configuration Custom Service Proxy Groups Faster Implementation of Functionality Can still be tested Implemented without IISReset! A lot of it works in O365. Even if you are just running a prepackaged script, you want to be able to verify what it does.
PowerShell 101 cmdlet – the commands you can run. Always in verb-noun format, i.e. – Get-SPWeb, Mount- SPContentDatabase Modules / Snap-ins – groups of PowerShell commands that can be loaded into your Command Prompt. Using Reflection, you can load any .NET assembly Alias – Shortcut commands for cmdlets Piping – Feeding the output of one cmdlet into another. As time and need permit, demo…
SharePoint + PowerShell Commands available in a Snapin Also, ships with SharePoint PowerShell Command Prompt Permissions set - Can be set via Add-SPShellAdmin on a database by database level Or, easier (but not as locked down) DBO on Database, Farm Admin rights Object names similar to object model code Use Get-Command, Get-Help, and TechNet to get the most out of Cmdlets
Questions? On to demos!
Investigating Site Collections Anyone have out of control site collections? Anyone just “inherit” a new site collection? Looking for usage of SharePoint Content? Want a cool diagram? DEMO!
Site Collection PowerShell
Feed Into Visio Org Chart Wizard to Auto-Build Hierarchy
Uploading Backup Logs Scheduled job in third party system? Centralized Audit and Management? Search enabled backup? Demo!
Uploading PowerShell
Interacting With Service Applications User Images in a different store – Not AD, Not BCS Accessible
SEO, Sitemaps, and PowerShell Internet Facing SharePoint Site – Marketing SEO is a big deal Lot of other components to help manage this Use the tools available to “help” Google and Bing Can Use SiteMap.xml files to properly index your content
Sitemap PowerShell
Replace Custom Timer Jobs Why Custom Timer Jobs? Why not Custom Timer Jobs? Use PowerShell and the Windows Task Scheduler Tool
Scheduled PowerShell Caveats No Output to a Console Window (Obviously) Permissions of the Scheduled Job May have to save a high-level set of credentials Another Item to Manage and Monitor A whole lot better than watching your Timer Jobs
Questions? Thanks for attending! If time permits, I’ve got more PowerShell scenarios and examples.
External DB System PowerShell
External REST Service Integration Call External Service to Enter In SP List Data – Caching Information