SlideShare a Scribd company logo
Automating your Enterprise Application
Deployments with PowerShell
 Geoff Varosky
   Jornata
    Managing Consultant, Senior Architect, Senior Developer, Director of
     Evangelism
    President & Co-Founder Boston Area SharePoint Users Group
    Co-Organizer SharePoint Saturday Boston
  Recent Awards
    Top 25 2012 Harmon.ie Online Community Influencer
    Top 50 2012 KnowledgeLake Community Influencer
  Blog – www.SharePointYankee.com
  Email – geoff@varosky.com
  Twitter – @gvaro
Automating Your Enterprise Application Deployments With PowerShell by Geoff Varosky - SPTechCon
   Why Automation?
   PowerShell
   Environment Deployment
   Application Deployment
   Further Refinement
   Resources & Tools
   Q&A
   Who is using SharePoint?
   SharePoint Developers?
   SharePoint Administrators?
   Familiar with Scripting Languages? (bash, batch files, perl, vbscript)
   Using PowerShell?
Automating Your Enterprise Application Deployments With PowerShell by Geoff Varosky - SPTechCon
 Pros
   “Almost” human-less deployments
   Re-Deployment
   Restoration
   Documented and actionable deployment
   Saves on knowledge transfer
   Reduces the risks of human error
   Repeatable process
 Cons
   Possible significant up-front time
   Knowledge of PowerShell needed
   Not managed code
   Requires constant upkeep
Automating Your Enterprise Application Deployments With PowerShell by Geoff Varosky - SPTechCon
 What is it?
   More flexible, faster, extensible, and POWERful than STSADM
   Scripting Language
   Based on C#
   Integrated with the .NET Framework
    Load in DLLs
    Provides full access to COM amd WMI
  Not limited to JUST PowerShell
    DOS commands (with UNIX-like aliases)
 Cmdlets
   PowerShell Commands
   Can create your own
   Standardized using a verb-noun convention
    Eat-Cake
    Drink-Beer
    Live-Life
 The Basics
   Get-Command
   Get-Help
   Piping
   Select-Object
 Aliases
  Cmdlet         DOS         Alias   Description
  Get-Location   pwd         gl      Current directory
  Set-Location   cd, chdir   sl      Change current directory
  Copy-Item      copy        cpi     Copy file/directory
  Remove-Item    del         ri      Remove file/directory
  Move-Item      move        mi      Move a file/directory
  New-Item       -           ni      New a file/directory/object
  Clear-Item     -           cli     Clear contents of file
  Get-Content    type        gc      Read file contents to output
  Set-Content    -           sc      Set file contents
  Format-Table   -           ft      Formats output
 SharePoint Management Shell
   Loaded with SharePoint 2010/2013
   Automatically Loads Microsoft.SharePoint.PowerShell Snap In
   531 cmdlets
 SharePoint Management Shell
   Requires PowerShell 2.0
   Backwards compatible, installs into 1.0 folder
    <%SystemRoot%>System32WindowsPowerShellv1.0PowerShell.exe
Automating Your Enterprise Application Deployments With PowerShell by Geoff Varosky - SPTechCon
Automating Your Enterprise Application Deployments With PowerShell by Geoff Varosky - SPTechCon
 AutoSPInstaller
   Deploy single or multi-server farms from one script
   XML-based configuration
   Re-launches with Elevated Privs to deal with User Access Control
   Automatically download and install platform pre-requisites
      Can be done in offline mode
    Install both SharePoint and Office Web Apps using config files
    ULS Logging path
    IIS Configuration
    PDF iFilter Installation
 AutoSPInstaller
   Remote installation into other servers into the farm
   Forefront installation and configuration
   Logging of all installation
   Easily re-start if a failure occurs
   Easily slipstream installations (service pack 1, CUs, etc.)
   Create web applications, site collections
   New WFE or App Server? Wash, Rinse, Repeat.
   New web application or service application? Wash, Rinse, Repeat.
 Configure Service Applications
    User Profile Service Application
    User Profile Synchronization Service
    Metadata Service Application
    SharePoint Foundation User Code Service
    State Service Application
    Usage and Health Service Application
    Secure Store Service
    Enterprise Search Service Application
    Web Analytics Service Application
    Business Data Connectivity Service Application
    Excel Service Application
    Access Service Application
 Configure Service Applications
    PerformancePoint Service Application
    Visio Graphics Service Application
    Word Automation (Conversion) Service Application
    Word Viewing Service Application
    Excel Service Application (if not already provisioned by virtue of having an Enterprise
     license)



 Not PowerPivot
   Overly complex install
 Creates databases based on YOUR naming conventions
 Maintenance
   Any configurable change needs to be updated
   If versioned, provides an evolution of your farm
   Ensures
Automating Your Enterprise Application Deployments With PowerShell by Geoff Varosky - SPTechCon
Automating Your Enterprise Application Deployments With PowerShell by Geoff Varosky - SPTechCon
 Why deploy applications in PowerShell?
   Developers can pass installations to administrators
   Replicable through environment deployments




      DEV                    TEST                   PROD
 What can be automated?
   Farm Configuration
   Service application configuration
    Search scopes
    Managed Metadata
  Web application configuration
    Upload limits
    Permission policies
  Solution Deployment
  EXE and MSI deployments
 Anatomy
   Deployment Master Script
      Variables
      Initiates Logging
      Step-By-Step Deployment
      Directions and Documentation
  Shared Functions File
    Updates not to be done across scripts
    Managed by platform team
  Steps
Automating Your Enterprise Application Deployments With PowerShell by Geoff Varosky - SPTechCon
 Documentation
   Provide overall Guidelines
      Basic usage, functionality
      Naming of scripts
      How scripts are used
      How to use basic functions
      How to run steps
 Documentation
   Function Reference
   Copy of Functions script
 Documentation
   Script Samples
    Helps with buy-in
    Gives examples
    Re-usable snippets
 Handle all configuration via XML file variables
 Export steps to their own scripts
 Manage entirely through SharePoint Lists
  Additional steps can be scripted/approved through workflow?
 Host documentation and example scripts in SharePoint, allow
 alerts for file changes
 What is COM?
  http://en.wikipedia.org/wiki/Component_Object_Model
 What is WMI?
  http://en.wikipedia.org/wiki/Windows_Management_Instrumentation
 PowerShell for SharePoint References
  2010: http://go.gvaro.net/XgmYCk
  2013: http://go.gvaro.net/YBLtGW
 Cmdlet Index
  2010: http://go.gvaro.net/WHh5wD
  2013: http://go.gvaro.net/151DGaX
 Windows PowerShell for SharePoint Command Builder
  http://go.gvaro.net/WS4s3u
 Gary Lapointe’s PowerShell cmdlets
  http://go.gvaro.net/YirJau
 AutoSPInstaller
  http://autospinstaller.codeplex.com
Automating Your Enterprise Application Deployments With PowerShell by Geoff Varosky - SPTechCon
   Meets 2nd Wednesday/month
   6-8PM
   Microsoft N.E.R.D. (Cambridge)
   BostonSharePointUG.org
   Twitter: @BASPUG / #BASPUG
   SPTechCon Hosted Meeting in August!
Automating Your Enterprise Application Deployments With PowerShell by Geoff Varosky - SPTechCon
 Geoff Varosky
   Jornata
    Managing Consultant, Senior Architect, Senior Developer, Director of
     Evangelism
    President & Co-Founder Boston Area SharePoint Users Group
    Co-Organizer SharePoint Saturday Boston
  Recent Awards
    Top 25 2012 Harmon.ie Online Community Influencer
    Top 50 2012 KnowledgeLake Community Influencer
  Blog – www.SharePointYankee.com
  Email – geoff@varosky.com
  Twitter – @gvaro

More Related Content

PPTX
Automating Enterprise Application Deployments with PowerShell
PPTX
John Burkholder: SharePoint 2010 in a multi tenant and hosted environment-nyc
PDF
Hidden Gems in ColdFusion 2016
PPTX
Microsoft Azure WebJobs
PPTX
TEC2010 SharePoint 2010 Upgrade
PPTX
Teched Middle East New World of SharePoint 2010 Administration with Joel Oles...
PPTX
Brian Jackett: Managing SharePoint 2010 Farms with Powershell
PPT
MOSS Content Deployment 12.18.2008 Final
Automating Enterprise Application Deployments with PowerShell
John Burkholder: SharePoint 2010 in a multi tenant and hosted environment-nyc
Hidden Gems in ColdFusion 2016
Microsoft Azure WebJobs
TEC2010 SharePoint 2010 Upgrade
Teched Middle East New World of SharePoint 2010 Administration with Joel Oles...
Brian Jackett: Managing SharePoint 2010 Farms with Powershell
MOSS Content Deployment 12.18.2008 Final

What's hot (20)

PPTX
Tech Ed Africa Demystifying Backup Restore In Share Point 2007
PPTX
Microsoft/Zend Webcast on Cloud Computing
PPTX
SharePoint Installation and Upgrade: Untangling Your Options
PDF
Developing for SP2013
PPTX
SharePoint 2010 Upgrade Drill Down
PDF
Windows Loves Drupal
PPTX
Intro to PowerShell
PPTX
Building Content-Rich Java Apps in the Cloud with the Alfresco API
PPTX
Moss 2007 Wcm Architecture And Development Best Practices In A Team Based E...
PPTX
Revised Adf security in a project centric environment
PPT
Restful API's with ColdFusion
PPTX
SharePoint 2010 Upgrade User Group and SharePoint Saturday
PPT
MOSS 2007 Deployment Fundamentals -Part2
PPTX
Windows Loves drupal
PPTX
system automation, integration and recovery
PPTX
Wordpress on Windows
PDF
BP-7 Share Customization Best Practices
PDF
Conduct JBoss EAP 6 seminar
KEY
Automating Web Application Deployment
PPTX
2014 cf summit_clustering
Tech Ed Africa Demystifying Backup Restore In Share Point 2007
Microsoft/Zend Webcast on Cloud Computing
SharePoint Installation and Upgrade: Untangling Your Options
Developing for SP2013
SharePoint 2010 Upgrade Drill Down
Windows Loves Drupal
Intro to PowerShell
Building Content-Rich Java Apps in the Cloud with the Alfresco API
Moss 2007 Wcm Architecture And Development Best Practices In A Team Based E...
Revised Adf security in a project centric environment
Restful API's with ColdFusion
SharePoint 2010 Upgrade User Group and SharePoint Saturday
MOSS 2007 Deployment Fundamentals -Part2
Windows Loves drupal
system automation, integration and recovery
Wordpress on Windows
BP-7 Share Customization Best Practices
Conduct JBoss EAP 6 seminar
Automating Web Application Deployment
2014 cf summit_clustering
Ad

Similar to Automating Your Enterprise Application Deployments With PowerShell by Geoff Varosky - SPTechCon (20)

PPTX
Developer application lifecycle process and tools - v.5
PPTX
Brian Jackett: Managing SharePoint 2010 Farms with Powershell
PPT
Managing Your Runtime With P2
PPTX
Wsv406 Advanced Automation Using Windows Power Shell2.0
PPTX
[Portland 365Sat] PCF Custom Controls
PPT
A Microsoft primer for PHP devs
PPT
Php Presentation
PPTX
Windows Azure & How to Deploy Wordress
PPTX
Whats New In 2010 (Msdn & Visual Studio)
PDF
Strategies and Tips for Building Enterprise Drupal Applications - PNWDS 2013
PPTX
Ws08 R2 Itpro Session 1 Technical Overview Part1
PPT
24 Hours Of Exchange Server 2007 (Part 8 Of 24)
PPTX
MSDN Presents: Visual Studio 2010, .NET 4, SharePoint 2010 for Developers
PPTX
My Saminar On Php
PPTX
Deploying Code In SharePoint
PPTX
SharePoint 2010 design and deploy
PPTX
Automating Desktop Management with Windows Powershell V2.0 and Group Policy M...
PPT
Windows Server 2008 - Web and Application Hosting
ODP
Scaling PHP Applications with Zend Platform
PPTX
PHP and FastCGI Performance Optimizations
Developer application lifecycle process and tools - v.5
Brian Jackett: Managing SharePoint 2010 Farms with Powershell
Managing Your Runtime With P2
Wsv406 Advanced Automation Using Windows Power Shell2.0
[Portland 365Sat] PCF Custom Controls
A Microsoft primer for PHP devs
Php Presentation
Windows Azure & How to Deploy Wordress
Whats New In 2010 (Msdn & Visual Studio)
Strategies and Tips for Building Enterprise Drupal Applications - PNWDS 2013
Ws08 R2 Itpro Session 1 Technical Overview Part1
24 Hours Of Exchange Server 2007 (Part 8 Of 24)
MSDN Presents: Visual Studio 2010, .NET 4, SharePoint 2010 for Developers
My Saminar On Php
Deploying Code In SharePoint
SharePoint 2010 design and deploy
Automating Desktop Management with Windows Powershell V2.0 and Group Policy M...
Windows Server 2008 - Web and Application Hosting
Scaling PHP Applications with Zend Platform
PHP and FastCGI Performance Optimizations
Ad

More from SPTechCon (20)

PPTX
Deep Dive into the Content Query Web Part by Christina Wheeler - SPTechCon
PDF
NOW I Get It... What SharePoint Is, and Why My Business Needs It by Mark Rack...
PPTX
“Managing Up” in Difficult Situations by Bill English - SPTechCon
PPTX
Part I: SharePoint 2013 Administration by Todd Klindt and Shane Young - SPTec...
PPTX
Part II: SharePoint 2013 Administration by Todd Klindt and Shane Young - SPTe...
PPTX
Microsoft Keynote by Richard Riley - SPTechCon
PPTX
Ten Best SharePoint Features You’ve Never Used by Christian Buckley - SPTechCon
PPTX
Looking Under the Hood: How Your Metadata Strategy Impacts Everything You Do ...
PPTX
Law & Order: Content Governance Strategies by Chrisitan Buckley - SPTechCon
PPTX
What IS SharePoint Development? by Mark Rackley - SPTechCon
PPTX
The SharePoint and jQuery Guide by Mark Rackley - SPTechCon
PPTX
Understanding and Implementing Governance for SharePoint 2010 by Bill English...
PPTX
Integrate External Data with the Business Connectivity Services by Tom Resing...
PDF
Converting an E-mail Culture into a SharePoint Culture by Robert Bogue - SPTe...
PPTX
Tutorial: Best Practices for Building a Records-Management Deployment in Shar...
PDF
Tutorial: Building Business Solutions: InfoPath & Workflows by Jennifer Mason...
PDF
Creating Simple Dashboards Using Out-of-the-Box Web Parts by Jennifer Mason- ...
PDF
Sponsored Session: Better Document Management Using SharePoint by Roland Simo...
PDF
Sponsored Session: The Missing Link: Content-Aware Integration to SharePoint ...
PPTX
Creating a Great User Experience in SharePoint by Marc Anderson - SPTechCon
Deep Dive into the Content Query Web Part by Christina Wheeler - SPTechCon
NOW I Get It... What SharePoint Is, and Why My Business Needs It by Mark Rack...
“Managing Up” in Difficult Situations by Bill English - SPTechCon
Part I: SharePoint 2013 Administration by Todd Klindt and Shane Young - SPTec...
Part II: SharePoint 2013 Administration by Todd Klindt and Shane Young - SPTe...
Microsoft Keynote by Richard Riley - SPTechCon
Ten Best SharePoint Features You’ve Never Used by Christian Buckley - SPTechCon
Looking Under the Hood: How Your Metadata Strategy Impacts Everything You Do ...
Law & Order: Content Governance Strategies by Chrisitan Buckley - SPTechCon
What IS SharePoint Development? by Mark Rackley - SPTechCon
The SharePoint and jQuery Guide by Mark Rackley - SPTechCon
Understanding and Implementing Governance for SharePoint 2010 by Bill English...
Integrate External Data with the Business Connectivity Services by Tom Resing...
Converting an E-mail Culture into a SharePoint Culture by Robert Bogue - SPTe...
Tutorial: Best Practices for Building a Records-Management Deployment in Shar...
Tutorial: Building Business Solutions: InfoPath & Workflows by Jennifer Mason...
Creating Simple Dashboards Using Out-of-the-Box Web Parts by Jennifer Mason- ...
Sponsored Session: Better Document Management Using SharePoint by Roland Simo...
Sponsored Session: The Missing Link: Content-Aware Integration to SharePoint ...
Creating a Great User Experience in SharePoint by Marc Anderson - SPTechCon

Automating Your Enterprise Application Deployments With PowerShell by Geoff Varosky - SPTechCon

  • 1. Automating your Enterprise Application Deployments with PowerShell
  • 2.  Geoff Varosky  Jornata  Managing Consultant, Senior Architect, Senior Developer, Director of Evangelism  President & Co-Founder Boston Area SharePoint Users Group  Co-Organizer SharePoint Saturday Boston  Recent Awards  Top 25 2012 Harmon.ie Online Community Influencer  Top 50 2012 KnowledgeLake Community Influencer  Blog – www.SharePointYankee.com  Email – geoff@varosky.com  Twitter – @gvaro
  • 4. Why Automation?  PowerShell  Environment Deployment  Application Deployment  Further Refinement  Resources & Tools  Q&A
  • 5. Who is using SharePoint?  SharePoint Developers?  SharePoint Administrators?  Familiar with Scripting Languages? (bash, batch files, perl, vbscript)  Using PowerShell?
  • 7.  Pros  “Almost” human-less deployments  Re-Deployment  Restoration  Documented and actionable deployment  Saves on knowledge transfer  Reduces the risks of human error  Repeatable process
  • 8.  Cons  Possible significant up-front time  Knowledge of PowerShell needed  Not managed code  Requires constant upkeep
  • 10.  What is it?  More flexible, faster, extensible, and POWERful than STSADM  Scripting Language  Based on C#  Integrated with the .NET Framework  Load in DLLs  Provides full access to COM amd WMI  Not limited to JUST PowerShell  DOS commands (with UNIX-like aliases)
  • 11.  Cmdlets  PowerShell Commands  Can create your own  Standardized using a verb-noun convention  Eat-Cake  Drink-Beer  Live-Life
  • 12.  The Basics  Get-Command  Get-Help  Piping  Select-Object
  • 13.  Aliases Cmdlet DOS Alias Description Get-Location pwd gl Current directory Set-Location cd, chdir sl Change current directory Copy-Item copy cpi Copy file/directory Remove-Item del ri Remove file/directory Move-Item move mi Move a file/directory New-Item - ni New a file/directory/object Clear-Item - cli Clear contents of file Get-Content type gc Read file contents to output Set-Content - sc Set file contents Format-Table - ft Formats output
  • 14.  SharePoint Management Shell  Loaded with SharePoint 2010/2013  Automatically Loads Microsoft.SharePoint.PowerShell Snap In  531 cmdlets
  • 15.  SharePoint Management Shell  Requires PowerShell 2.0  Backwards compatible, installs into 1.0 folder  <%SystemRoot%>System32WindowsPowerShellv1.0PowerShell.exe
  • 18.  AutoSPInstaller  Deploy single or multi-server farms from one script  XML-based configuration  Re-launches with Elevated Privs to deal with User Access Control  Automatically download and install platform pre-requisites  Can be done in offline mode  Install both SharePoint and Office Web Apps using config files  ULS Logging path  IIS Configuration  PDF iFilter Installation
  • 19.  AutoSPInstaller  Remote installation into other servers into the farm  Forefront installation and configuration  Logging of all installation  Easily re-start if a failure occurs  Easily slipstream installations (service pack 1, CUs, etc.)  Create web applications, site collections  New WFE or App Server? Wash, Rinse, Repeat.  New web application or service application? Wash, Rinse, Repeat.
  • 20.  Configure Service Applications  User Profile Service Application  User Profile Synchronization Service  Metadata Service Application  SharePoint Foundation User Code Service  State Service Application  Usage and Health Service Application  Secure Store Service  Enterprise Search Service Application  Web Analytics Service Application  Business Data Connectivity Service Application  Excel Service Application  Access Service Application
  • 21.  Configure Service Applications  PerformancePoint Service Application  Visio Graphics Service Application  Word Automation (Conversion) Service Application  Word Viewing Service Application  Excel Service Application (if not already provisioned by virtue of having an Enterprise license)  Not PowerPivot  Overly complex install
  • 22.  Creates databases based on YOUR naming conventions
  • 23.  Maintenance  Any configurable change needs to be updated  If versioned, provides an evolution of your farm  Ensures
  • 26.  Why deploy applications in PowerShell?  Developers can pass installations to administrators  Replicable through environment deployments DEV TEST PROD
  • 27.  What can be automated?  Farm Configuration  Service application configuration  Search scopes  Managed Metadata  Web application configuration  Upload limits  Permission policies  Solution Deployment  EXE and MSI deployments
  • 28.  Anatomy  Deployment Master Script  Variables  Initiates Logging  Step-By-Step Deployment  Directions and Documentation  Shared Functions File  Updates not to be done across scripts  Managed by platform team  Steps
  • 30.  Documentation  Provide overall Guidelines  Basic usage, functionality  Naming of scripts  How scripts are used  How to use basic functions  How to run steps
  • 31.  Documentation  Function Reference  Copy of Functions script
  • 32.  Documentation  Script Samples  Helps with buy-in  Gives examples  Re-usable snippets
  • 33.  Handle all configuration via XML file variables  Export steps to their own scripts  Manage entirely through SharePoint Lists  Additional steps can be scripted/approved through workflow?  Host documentation and example scripts in SharePoint, allow alerts for file changes
  • 34.  What is COM?  http://en.wikipedia.org/wiki/Component_Object_Model  What is WMI?  http://en.wikipedia.org/wiki/Windows_Management_Instrumentation  PowerShell for SharePoint References  2010: http://go.gvaro.net/XgmYCk  2013: http://go.gvaro.net/YBLtGW  Cmdlet Index  2010: http://go.gvaro.net/WHh5wD  2013: http://go.gvaro.net/151DGaX
  • 35.  Windows PowerShell for SharePoint Command Builder  http://go.gvaro.net/WS4s3u  Gary Lapointe’s PowerShell cmdlets  http://go.gvaro.net/YirJau  AutoSPInstaller  http://autospinstaller.codeplex.com
  • 37. Meets 2nd Wednesday/month  6-8PM  Microsoft N.E.R.D. (Cambridge)  BostonSharePointUG.org  Twitter: @BASPUG / #BASPUG  SPTechCon Hosted Meeting in August!
  • 39.  Geoff Varosky  Jornata  Managing Consultant, Senior Architect, Senior Developer, Director of Evangelism  President & Co-Founder Boston Area SharePoint Users Group  Co-Organizer SharePoint Saturday Boston  Recent Awards  Top 25 2012 Harmon.ie Online Community Influencer  Top 50 2012 KnowledgeLake Community Influencer  Blog – www.SharePointYankee.com  Email – geoff@varosky.com  Twitter – @gvaro

Editor's Notes

  • #3: Wonderful family, wife, 2 kids, love camping, hiking, backpacking, snowshoeing, and I’m also a stand-up comedian, and I love a good 80’s themed party.
  • #8: Upkeep – all code requires this.
  • #10: Component Object ModelWindows Management InstrumentationUnlike VBScript, it is a way for interacting with .NET objects
  • #16: Get-command -Verb GetGet-command –Noun AddGet-command SP*Set-Location Alias: &gt; Get-ChildItemGet-PSProvider
  • #18: Why AutoSPInstaller? The work has all been done for you, you can modify the code as needed.
  • #22: No more GUID gobbeldygook
  • #27: You name it!