SlideShare ist ein Scribd-Unternehmen logo
1 von 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:

Weitere ähnliche Inhalte

Kürzlich hochgeladen

+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
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 

Kürzlich hochgeladen (20)

EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
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
 
+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...
 
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
 
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
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source Milvus
 
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
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 

Empfohlen

How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
 

Empfohlen (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

SPSBE 2012 - PowerShell and SharePoint

  • 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: