SlideShare una empresa de Scribd logo
1 de 14
#SPSBE




  PowerShell your SharePoint
environment from setup to finish
             #SPSBE20



           Adam Burcher
About me
• Adam Burcher
• http://www.thesharepointbaker.co.uk
• #sharepointbaker
• ad@thesharepointbaker.co.uk


• SharePoint Developer & IT
A big thanks to our sponsors

Platinum Sponsors




Gold Premium Sponsors          Venue Sponsor




Gold Sponsors
Agenda
• PowerShell – what, why and who?
• Out of the Box
• Writing custom functions
• Demo
   • Build a SharePoint Farm
   • Configure a site
   • Deploy code and then content
PowerShell – what?
• Scripting language/framework
• Configuring Server technologies – SharePoint, Windows, Active
  Directory, Exchange....
• Blurs the lines between scripting (e.g. MS DOS) and code (e.g.
  C#)
PowerShell – why?
• Automation – if its scripted, you can run it again
• Documented – scripts can form documentation
• Simplified rolls outs – scripts do all the work
• Distinction between „Code‟, „Content‟ and „Configuration‟
    • Code = WSP, C#, DLL
    • Content & Configuration = PowerShell
PowerShell – who?
• IT Admins & Dev
• One option – IT Admin manage scripts for server, farm and web
  app setup. Dev everything else.
• “Befriend a Dev”
• If SharePoint offers collaboration across a
  business, PowerShell is collaboration between IT Admins and
  Dev
Out of the box
• SharePoint comes with a number of very useful cmdlets
      • New-SPWebApplication
      • Get-SPSite
• Typically you can interchange the „verb‟ – New, Get, Set
• Extend by wrapping custom logic – ifs, loops, etc

$managedAccount = Get-SPManagedAccount | ?{$_.UserName –eq “tsbappPoolAccount”}

if (-not $managedAccount)
{
            New-SPManagedAccount –credientials $credientials
}
Writing custom scripts
• You can write custom cmdlets in code and compile
• Custom functions don‟t require “code” (& compiling)
• Good news is you can access the SharePoint OM
• Bad news is you can access the SharePoint OM
• Good C# Code...can make good PowerShell
• Bad C# Code...will make bad PowerShell
• Treat PowerShell as Production Code
The Scripts
• Deploy-me.ps1 {args}

 farmsetup
  Create the
   Farm &        webapp
 Central Admin   Create our Web
                     App &         deploy
                 Site Collection
                                      Deploy    content
                                     Features      Deploy
                                                   Content
Demo



  Building our Farm & Site
What‟s next?
• Extend scripts for other elements –
   • Service Applications – search, meta data etc
   • Other content – new Webs (site hierarchy)
   • Permissions, users, documents etc
• Create EnvVars for UAT, Prod etc
• Write a Release Note & Document!
• Test Scripts!
• Remember, anytime you go to Central Admin or your site to make
  a change, think – should you script it?
Q&A



  Any questions…?
We need your feedback!

               Scan this QR code or visit
               http://svy.mk/sps2012be


               Our sponsors:

Más contenido relacionado

Más de BIWUG

Más de BIWUG (20)

Deep dive into advanced teams development
Deep dive into advanced teams developmentDeep dive into advanced teams development
Deep dive into advanced teams development
 
SharePoint wizards - no magic needed, just use Microsoft Flow
SharePoint wizards - no magic needed, just use Microsoft FlowSharePoint wizards - no magic needed, just use Microsoft Flow
SharePoint wizards - no magic needed, just use Microsoft Flow
 
Make IT Pro's great again: Microsoft Azure for the SharePoint professional
Make IT Pro's great again: Microsoft Azure for the SharePoint professionalMake IT Pro's great again: Microsoft Azure for the SharePoint professional
Make IT Pro's great again: Microsoft Azure for the SharePoint professional
 
Modern collaboration in teams and projects with Microsoft 365
Modern collaboration in teams and projects with Microsoft 365Modern collaboration in teams and projects with Microsoft 365
Modern collaboration in teams and projects with Microsoft 365
 
Mining SharePoint data with PowerBI
Mining SharePoint data with PowerBIMining SharePoint data with PowerBI
Mining SharePoint data with PowerBI
 
Don't simply deploy, transform! Build your digital workplace in Office 365
Don't simply deploy, transform! Build your digital workplace in Office 365Don't simply deploy, transform! Build your digital workplace in Office 365
Don't simply deploy, transform! Build your digital workplace in Office 365
 
Connect SharePoint Framework solutions to APIs secured with Azure AD
Connect SharePoint Framework solutions to APIs secured with Azure ADConnect SharePoint Framework solutions to APIs secured with Azure AD
Connect SharePoint Framework solutions to APIs secured with Azure AD
 
Cloud First. Be Prepared
Cloud First. Be PreparedCloud First. Be Prepared
Cloud First. Be Prepared
 
APIs, APIs Everywhere!
APIs, APIs Everywhere!APIs, APIs Everywhere!
APIs, APIs Everywhere!
 
Advanced PowerShell for Office 365
Advanced PowerShell for Office 365Advanced PowerShell for Office 365
Advanced PowerShell for Office 365
 
New era of customizing site provisioning
New era of customizing site provisioningNew era of customizing site provisioning
New era of customizing site provisioning
 
Understanding SharePoint Framework Extensions
Understanding SharePoint Framework ExtensionsUnderstanding SharePoint Framework Extensions
Understanding SharePoint Framework Extensions
 
Microsoft Flow in Real World Projects: 2 Years later & What's next
Microsoft Flow in Real World Projects: 2 Years later & What's nextMicrosoft Flow in Real World Projects: 2 Years later & What's next
Microsoft Flow in Real World Projects: 2 Years later & What's next
 
Microsoft Stream - Your enterprise video portal unleashed
Microsoft Stream - Your enterprise video portal unleashedMicrosoft Stream - Your enterprise video portal unleashed
Microsoft Stream - Your enterprise video portal unleashed
 
What's new in SharePoint Server 2019
What's new in SharePoint Server 2019What's new in SharePoint Server 2019
What's new in SharePoint Server 2019
 
Why you shouldn't probably care about Machine Learning
Why you shouldn't probably care about Machine LearningWhy you shouldn't probably care about Machine Learning
Why you shouldn't probably care about Machine Learning
 
Transforming your classic team sites in group connected team sites
Transforming your classic team sites in group connected team sitesTransforming your classic team sites in group connected team sites
Transforming your classic team sites in group connected team sites
 
Teams - There's no place like home
Teams - There's no place like homeTeams - There's no place like home
Teams - There's no place like home
 
The Future State of Document Management, Taxonomies and Metadata in the Cloud
The Future State of Document Management, Taxonomies and Metadata in the CloudThe Future State of Document Management, Taxonomies and Metadata in the Cloud
The Future State of Document Management, Taxonomies and Metadata in the Cloud
 
Model Driven PowerApps
Model Driven PowerAppsModel Driven PowerApps
Model Driven PowerApps
 

Último

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Último (20)

Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 

Adam burcher powershell-setupsp_environment-spsbe20

  • 1. #SPSBE PowerShell your SharePoint environment from setup to finish #SPSBE20 Adam Burcher
  • 2. About me • Adam Burcher • http://www.thesharepointbaker.co.uk • #sharepointbaker • ad@thesharepointbaker.co.uk • SharePoint Developer & IT
  • 3. A big thanks to our sponsors Platinum Sponsors Gold Premium Sponsors Venue Sponsor Gold Sponsors
  • 4. Agenda • PowerShell – what, why and who? • Out of the Box • Writing custom functions • Demo • Build a SharePoint Farm • Configure a site • Deploy code and then content
  • 5. PowerShell – what? • Scripting language/framework • Configuring Server technologies – SharePoint, Windows, Active Directory, Exchange.... • Blurs the lines between scripting (e.g. MS DOS) and code (e.g. C#)
  • 6. PowerShell – why? • Automation – if its scripted, you can run it again • Documented – scripts can form documentation • Simplified rolls outs – scripts do all the work • Distinction between „Code‟, „Content‟ and „Configuration‟ • Code = WSP, C#, DLL • Content & Configuration = PowerShell
  • 7. PowerShell – who? • IT Admins & Dev • One option – IT Admin manage scripts for server, farm and web app setup. Dev everything else. • “Befriend a Dev” • If SharePoint offers collaboration across a business, PowerShell is collaboration between IT Admins and Dev
  • 8. Out of the box • SharePoint comes with a number of very useful cmdlets • New-SPWebApplication • Get-SPSite • Typically you can interchange the „verb‟ – New, Get, Set • Extend by wrapping custom logic – ifs, loops, etc $managedAccount = Get-SPManagedAccount | ?{$_.UserName –eq “tsbappPoolAccount”} if (-not $managedAccount) { New-SPManagedAccount –credientials $credientials }
  • 9. Writing custom scripts • You can write custom cmdlets in code and compile • Custom functions don‟t require “code” (& compiling) • Good news is you can access the SharePoint OM • Bad news is you can access the SharePoint OM • Good C# Code...can make good PowerShell • Bad C# Code...will make bad PowerShell • Treat PowerShell as Production Code
  • 10. The Scripts • Deploy-me.ps1 {args} farmsetup Create the Farm & webapp Central Admin Create our Web App & deploy Site Collection Deploy content Features Deploy Content
  • 11. Demo Building our Farm & Site
  • 12. What‟s next? • Extend scripts for other elements – • Service Applications – search, meta data etc • Other content – new Webs (site hierarchy) • Permissions, users, documents etc • Create EnvVars for UAT, Prod etc • Write a Release Note & Document! • Test Scripts! • Remember, anytime you go to Central Admin or your site to make a change, think – should you script it?
  • 13. Q&A Any questions…?
  • 14. We need your feedback! Scan this QR code or visit http://svy.mk/sps2012be Our sponsors: