SlideShare une entreprise Scribd logo
1  sur  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:

Contenu connexe

Plus de BIWUG

Plus 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
 

Dernier

IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 

Dernier (20)

Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
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)
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
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
 
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
 

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: