SlideShare a Scribd company logo
Getting Started with
SharePoint + PowerShell
       Ryan Dennis
    @SharePointRyan
  www.SharePointRyan.com
Learn PowerShell. 24/7, Anywhere.




 Enter POWERSAT at checkout to save
      $50 on any training course.
          www.TRAINSIGNAL.com
SeeShell
            Simple and Effective
             Data Visualization
              For PowerShell

              Use Coupon Code
                 PSSAT002
               And save 20%

http://www.codeowls.com/seeshell
About The Speaker
Ryan Dennis, MCTS, MCPD, MCITP
Senior SharePoint Engineer @ ICC
Microsoft Virtual Technology Specialist (vTSP)


        www.SharePointRyan.com
        @SharePointRyan
        linkedin.com/in/sharepointryan
        ryan@sharepointryan.com
Windows PowerShell
…is a task-based command-line shell and
scripting language designed especially for
Windows system administration

…has a task-based scripting language

…includes powerful object manipulation
capabilities

…is built on the .NET Framework
Verb-Noun
PowerShell uses a Verb-Noun syntax for its
Cmdlets
• Get-Something
• Set-Something
• New-Something
• Remove-Something
Get-Command & Get-Help
• While you can do a lot of the same things
  as the typical command prompt, use Get-
  Command to see available commands
• Use Get-Help <cmdlet> to get help
  information for a cmdlet
Using PowerShell Profiles
• PowerShell uses 2 profiles, a user specific
  profile and a machine-wide profile…
• Use profiles to pre-load
  scripts, functions, environmental
  variables, shell settings, aliases, etc.
Script Editors & Tools
• Notepad.exe (Lame)
• Notepad++ (Less Lame)
• Windows PowerShell ISE (Pretty Good -
  includes IntelliSense, Syntax highlighting)
• Quest PowerGUI (Awesome – Adds
  advanced debugging, and other cool
  things – don’t worry, I’ll show you!)
• Others…
SharePoint 2010 Cmdlets
• 500+ Cmdlets…
• MUCH better than STSADM.exe…
• Can automate complete installations and
  configurations…
• Still doesn’t answer every scenario, leaving
  gaps in functionality…
  – Example: Get, New and Remove SharePoint
    Groups – no cmdlet, easy to write a custom
    function though…
Creating a SharePoint Web Application using out-of-the-box
PowerShell Cmdlets

           DEMONSTRATION
Demo Recap
• Used New-SPWebApplication to create a
  new SharePoint Web Application…
• Stored the SPWebApplication object into
  the $webapp variable
• Used Get-Member to view Methods and
  Properties associated with the Web
  Application
Creating a SharePoint Site Collection using out-of-the-box
PowerShell Cmdlets

     DEMONSTRATION TWO
Demo Recap
• Used New-SPSite to create a new SharePoint Site
  Collection…
• Stored the SPSite object into the $site variable
• Created a $web variable from $site.rootweb
• Used the $web variable to change the Site Title
  using the SP Object Model
• Used Get-History and Pipeline to create a simple
  script from our command history…
• Cool right, but what if we could make this
  reusable???  (Hint: we can)
Extending PowerShell with Scripts
          and Functions
• PowerShell Scripts have .ps1 file extension…
• Scripts and functions behave similarly if not
  identically, but functions are more reusable…
• Scripts can reference functions and cmdlets…
• Functions can include other functions within
  them and can also reference cmdlets…
Using what we already learned and making it better.

  DEMONSTRATION THREE
Demo Recap
• Used the following cmdlets in conjunction with the
  pipeline to automagically build a function based on
  what we did in our first demonstration:
   – Get-History
   – Select-Object
   – Out-File
• Used Quest PowerGUI to edit our function by
  adding Parameters, eliminating hard-coded values…
• Added comment-based help from PowerGUI
  Snippet…
• Tried out our cool, new function…
The Power IS in the Shell, Use it
             Wisely!
• PowerShell is VERY powerful, be aware of
  memory issues...
• Use dispose() method for Site and Web
  objects, or better yet…
• Use Start-SPAssignment –Global to capture all
  objects in the Global store, then use
  Stop-SPAssignment –Global to dispose of all
  objects…
Get-Resources
1.   TechNet for general PowerShell information…
2.   The Hey, Scripting Guy! blog
3.   Get-SPScripts.com
4.   Gary Lapointe
5.   Get-Help in a PowerShell window…
6.   SharePointRyan.com (yes, my blog)…
Got-Questions -?
Ryan Dennis, MCTS, MCPD, MCITP
Senior SharePoint Engineer @ ICC
Microsoft Virtual Technology Specialist (vTSP)


        www.SharePointRyan.com
        @SharePointRyan
        linkedin.com/in/sharepointryan
        ryan@sharepointryan.com

More Related Content

What's hot (20)

PPTX
SenchaCon 2016: A Look Ahead: Survey Next-Gen Modern Browser APIs - Shikhir S...
Sencha
 
PPTX
SenchaCon 2016: Building Enterprise Ext JS Apps with Mavenized Sencha Cmd - F...
Sencha
 
PPTX
Laravel ppt
Mayank Panchal
 
PPT
What Is Hobo ?
Evarist Lobo
 
PPTX
PowerShell and SharePoint
Talbott Crowell
 
PPTX
Power shell for sp admins
Rick Taylor
 
PPT
SenchaCon 2016: LinkRest - Modern RESTful API Framework for Ext JS Apps - Rou...
Sencha
 
PDF
Laravel presentation
Toufiq Mahmud
 
PPTX
Laravel Tutorial PPT
Piyush Aggarwal
 
PDF
Laravel Introduction
Ahmad Shah Hafizan Hamidin
 
PPTX
Laravel overview
Obinna Akunne
 
PPTX
SenchaCon 2016: Upgrading an Ext JS 4.x Application to Ext JS 6.x - Mark Linc...
Sencha
 
PPTX
Getting started with laravel
Advance Idea Infotech
 
PDF
Backbone.js Architecture Example - Echoes Media Player (Hebrew)
Yifat Kanfi
 
PDF
Best Practices for WordPress
Taylor Lovett
 
PPTX
SharePoint Development 101
Greg Hurlman
 
PDF
Tutorial, Part 2: SharePoint 101: Jump-Starting the Developer by Rob Windsor ...
SPTechCon
 
PDF
Here Be Dragons - Debugging WordPress
Rami Sayar
 
PDF
Isomorphic WordPress Applications with NodeifyWP
Taylor Lovett
 
SenchaCon 2016: A Look Ahead: Survey Next-Gen Modern Browser APIs - Shikhir S...
Sencha
 
SenchaCon 2016: Building Enterprise Ext JS Apps with Mavenized Sencha Cmd - F...
Sencha
 
Laravel ppt
Mayank Panchal
 
What Is Hobo ?
Evarist Lobo
 
PowerShell and SharePoint
Talbott Crowell
 
Power shell for sp admins
Rick Taylor
 
SenchaCon 2016: LinkRest - Modern RESTful API Framework for Ext JS Apps - Rou...
Sencha
 
Laravel presentation
Toufiq Mahmud
 
Laravel Tutorial PPT
Piyush Aggarwal
 
Laravel Introduction
Ahmad Shah Hafizan Hamidin
 
Laravel overview
Obinna Akunne
 
SenchaCon 2016: Upgrading an Ext JS 4.x Application to Ext JS 6.x - Mark Linc...
Sencha
 
Getting started with laravel
Advance Idea Infotech
 
Backbone.js Architecture Example - Echoes Media Player (Hebrew)
Yifat Kanfi
 
Best Practices for WordPress
Taylor Lovett
 
SharePoint Development 101
Greg Hurlman
 
Tutorial, Part 2: SharePoint 101: Jump-Starting the Developer by Rob Windsor ...
SPTechCon
 
Here Be Dragons - Debugging WordPress
Rami Sayar
 
Isomorphic WordPress Applications with NodeifyWP
Taylor Lovett
 

Viewers also liked (6)

PPTX
So You Want to Be a SharePoint Developer - SPS Utah 2015
Ryan Schouten
 
PPTX
SharePoint Saturday Silicon Valley - SharePoint Apps - Ryan Schouten
Ryan Schouten
 
PPTX
So You Want To Be A SharePoint Developer-SPS Silicon Valley 2015
Ryan Schouten
 
DOC
SharePoint Online App Model Guidance
Ryan Berg
 
PPTX
SharePoint Saturday Cincinnati 2014 - CSOM
Ryan Dennis
 
PPTX
Using office add ins to solve business problems-SharePoint Saturday Redmond 2015
Ryan Schouten
 
So You Want to Be a SharePoint Developer - SPS Utah 2015
Ryan Schouten
 
SharePoint Saturday Silicon Valley - SharePoint Apps - Ryan Schouten
Ryan Schouten
 
So You Want To Be A SharePoint Developer-SPS Silicon Valley 2015
Ryan Schouten
 
SharePoint Online App Model Guidance
Ryan Berg
 
SharePoint Saturday Cincinnati 2014 - CSOM
Ryan Dennis
 
Using office add ins to solve business problems-SharePoint Saturday Redmond 2015
Ryan Schouten
 
Ad

Similar to Intro to SharePoint + PowerShell (20)

PPTX
Introduction to windows power shell in sharepoint 2010
Binh Nguyen
 
PPTX
Introduction to PowerShell - Be a PowerShell Hero - SPFest workshop
Michael Blumenthal (Microsoft MVP)
 
PDF
Introduction to PowerShell
Boulos Dib
 
PPTX
Introduction to PowerShell for SharePoint Admins and Developers - SharePoint ...
Michael Blumenthal (Microsoft MVP)
 
PPTX
Introduction to PowerShell for SharePoint - SharePointFest 2014 workshop
Michael Blumenthal (Microsoft MVP)
 
PPTX
Automating PowerShell with SharePoint
Talbott Crowell
 
PPTX
Brian Jackett: Managing SharePoint 2010 Farms with Powershell
SharePoint Saturday NY
 
PPTX
Brian Jackett: Managing SharePoint 2010 Farms with Powershell
SharePoint Saturday NY
 
PPTX
Making Life Easier with PowerShell (SPSVB 2012)
Michael Greene
 
PPTX
Making Life Easier with PowerShell - SPSRIC
Michael Greene
 
PPTX
PowerShell-1
Saravanan G
 
PPTX
Intro to PowerShell
Adam Preston
 
PPTX
Using PowerShell for SharePoint 2013
Nikolas Charlebois-Laprade
 
PPTX
Spsatx slides (widescreen)
Ryan Dennis
 
PPTX
Introduction to PowerShell and getting started
Ravikanth Chaganti
 
PDF
Operacion Guinda 2
Red RADAR
 
PPTX
Managing SharePoint Anywhere with Windows PowerShell
Ryan Dennis
 
PDF
Sql Server & PowerShell
Aaron Shilo
 
PPTX
Power shell basics in sharepoint 2010 - SharePoint Saturday Houston 2010
Corey Roth
 
PPTX
PowerShell 101
Thomas Lee
 
Introduction to windows power shell in sharepoint 2010
Binh Nguyen
 
Introduction to PowerShell - Be a PowerShell Hero - SPFest workshop
Michael Blumenthal (Microsoft MVP)
 
Introduction to PowerShell
Boulos Dib
 
Introduction to PowerShell for SharePoint Admins and Developers - SharePoint ...
Michael Blumenthal (Microsoft MVP)
 
Introduction to PowerShell for SharePoint - SharePointFest 2014 workshop
Michael Blumenthal (Microsoft MVP)
 
Automating PowerShell with SharePoint
Talbott Crowell
 
Brian Jackett: Managing SharePoint 2010 Farms with Powershell
SharePoint Saturday NY
 
Brian Jackett: Managing SharePoint 2010 Farms with Powershell
SharePoint Saturday NY
 
Making Life Easier with PowerShell (SPSVB 2012)
Michael Greene
 
Making Life Easier with PowerShell - SPSRIC
Michael Greene
 
PowerShell-1
Saravanan G
 
Intro to PowerShell
Adam Preston
 
Using PowerShell for SharePoint 2013
Nikolas Charlebois-Laprade
 
Spsatx slides (widescreen)
Ryan Dennis
 
Introduction to PowerShell and getting started
Ravikanth Chaganti
 
Operacion Guinda 2
Red RADAR
 
Managing SharePoint Anywhere with Windows PowerShell
Ryan Dennis
 
Sql Server & PowerShell
Aaron Shilo
 
Power shell basics in sharepoint 2010 - SharePoint Saturday Houston 2010
Corey Roth
 
PowerShell 101
Thomas Lee
 
Ad

More from Ryan Dennis (14)

PPTX
Don't be afraid of moving infrastructure into Azure!
Ryan Dennis
 
PPTX
Leave the fileshare, and join the enterprise content revolution!
Ryan Dennis
 
PPTX
Leave the Fileshare, and join the Enterprise Content Revolution!
Ryan Dennis
 
PPTX
Herding CATS: Gaining user adoption with these 4 principles
Ryan Dennis
 
PPTX
Leave The Fileshare and join the Enterprise Content Revolution!
Ryan Dennis
 
PPTX
SPSCBUS Slides Scarlet InfoPath
Ryan Dennis
 
PPTX
Dogfood slides 2012
Ryan Dennis
 
PPTX
ScarePoint Saturday Spookinnati Slides
Ryan Dennis
 
PPTX
DAYSPUG - Funnel your info down a new path
Ryan Dennis
 
PPTX
Build your SharePoint Internet Presence with PowerShell
Ryan Dennis
 
PPTX
Funnel your Info down a new Path
Ryan Dennis
 
PPTX
SPS Dayton Slides
Ryan Dennis
 
PDF
SPS Cincinnati slidedeck (pdf)
Ryan Dennis
 
PPTX
SPS Cincinnati slidedeck
Ryan Dennis
 
Don't be afraid of moving infrastructure into Azure!
Ryan Dennis
 
Leave the fileshare, and join the enterprise content revolution!
Ryan Dennis
 
Leave the Fileshare, and join the Enterprise Content Revolution!
Ryan Dennis
 
Herding CATS: Gaining user adoption with these 4 principles
Ryan Dennis
 
Leave The Fileshare and join the Enterprise Content Revolution!
Ryan Dennis
 
SPSCBUS Slides Scarlet InfoPath
Ryan Dennis
 
Dogfood slides 2012
Ryan Dennis
 
ScarePoint Saturday Spookinnati Slides
Ryan Dennis
 
DAYSPUG - Funnel your info down a new path
Ryan Dennis
 
Build your SharePoint Internet Presence with PowerShell
Ryan Dennis
 
Funnel your Info down a new Path
Ryan Dennis
 
SPS Dayton Slides
Ryan Dennis
 
SPS Cincinnati slidedeck (pdf)
Ryan Dennis
 
SPS Cincinnati slidedeck
Ryan Dennis
 

Recently uploaded (20)

PDF
🚀 Let’s Build Our First Slack Workflow! 🔧.pdf
SanjeetMishra29
 
PDF
Kubernetes - Architecture & Components.pdf
geethak285
 
PDF
Understanding The True Cost of DynamoDB Webinar
ScyllaDB
 
PDF
Hello I'm "AI" Your New _________________
Dr. Tathagat Varma
 
PDF
Pipeline Industry IoT - Real Time Data Monitoring
Safe Software
 
PDF
“A Re-imagination of Embedded Vision System Design,” a Presentation from Imag...
Edge AI and Vision Alliance
 
PPTX
Practical Applications of AI in Local Government
OnBoard
 
PPTX
Mastering Authorization: Integrating Authentication and Authorization Data in...
Hitachi, Ltd. OSS Solution Center.
 
PDF
ICONIQ State of AI Report 2025 - The Builder's Playbook
Razin Mustafiz
 
PDF
How to Comply With Saudi Arabia’s National Cybersecurity Regulations.pdf
Bluechip Advanced Technologies
 
PDF
Simplify Your FME Flow Setup: Fault-Tolerant Deployment Made Easy with Packer...
Safe Software
 
PDF
Unlocking FME Flow’s Potential: Architecture Design for Modern Enterprises
Safe Software
 
PPTX
Enabling the Digital Artisan – keynote at ICOCI 2025
Alan Dix
 
PPSX
Usergroup - OutSystems Architecture.ppsx
Kurt Vandevelde
 
PDF
5 Things to Consider When Deploying AI in Your Enterprise
Safe Software
 
PDF
Bridging CAD, IBM TRIRIGA & GIS with FME: The Portland Public Schools Case
Safe Software
 
PDF
“Scaling i.MX Applications Processors’ Native Edge AI with Discrete AI Accele...
Edge AI and Vision Alliance
 
PPTX
MARTSIA: A Tool for Confidential Data Exchange via Public Blockchain - Poster...
Michele Kryston
 
PPTX
CapCut Pro PC Crack Latest Version Free Free
josanj305
 
PDF
How to Visualize the ​Spatio-Temporal Data Using CesiumJS​
SANGHEE SHIN
 
🚀 Let’s Build Our First Slack Workflow! 🔧.pdf
SanjeetMishra29
 
Kubernetes - Architecture & Components.pdf
geethak285
 
Understanding The True Cost of DynamoDB Webinar
ScyllaDB
 
Hello I'm "AI" Your New _________________
Dr. Tathagat Varma
 
Pipeline Industry IoT - Real Time Data Monitoring
Safe Software
 
“A Re-imagination of Embedded Vision System Design,” a Presentation from Imag...
Edge AI and Vision Alliance
 
Practical Applications of AI in Local Government
OnBoard
 
Mastering Authorization: Integrating Authentication and Authorization Data in...
Hitachi, Ltd. OSS Solution Center.
 
ICONIQ State of AI Report 2025 - The Builder's Playbook
Razin Mustafiz
 
How to Comply With Saudi Arabia’s National Cybersecurity Regulations.pdf
Bluechip Advanced Technologies
 
Simplify Your FME Flow Setup: Fault-Tolerant Deployment Made Easy with Packer...
Safe Software
 
Unlocking FME Flow’s Potential: Architecture Design for Modern Enterprises
Safe Software
 
Enabling the Digital Artisan – keynote at ICOCI 2025
Alan Dix
 
Usergroup - OutSystems Architecture.ppsx
Kurt Vandevelde
 
5 Things to Consider When Deploying AI in Your Enterprise
Safe Software
 
Bridging CAD, IBM TRIRIGA & GIS with FME: The Portland Public Schools Case
Safe Software
 
“Scaling i.MX Applications Processors’ Native Edge AI with Discrete AI Accele...
Edge AI and Vision Alliance
 
MARTSIA: A Tool for Confidential Data Exchange via Public Blockchain - Poster...
Michele Kryston
 
CapCut Pro PC Crack Latest Version Free Free
josanj305
 
How to Visualize the ​Spatio-Temporal Data Using CesiumJS​
SANGHEE SHIN
 

Intro to SharePoint + PowerShell

  • 1. Getting Started with SharePoint + PowerShell Ryan Dennis @SharePointRyan www.SharePointRyan.com
  • 2. Learn PowerShell. 24/7, Anywhere. Enter POWERSAT at checkout to save $50 on any training course. www.TRAINSIGNAL.com
  • 3. SeeShell Simple and Effective Data Visualization For PowerShell Use Coupon Code PSSAT002 And save 20% http://www.codeowls.com/seeshell
  • 4. About The Speaker Ryan Dennis, MCTS, MCPD, MCITP Senior SharePoint Engineer @ ICC Microsoft Virtual Technology Specialist (vTSP) www.SharePointRyan.com @SharePointRyan linkedin.com/in/sharepointryan [email protected]
  • 5. Windows PowerShell …is a task-based command-line shell and scripting language designed especially for Windows system administration …has a task-based scripting language …includes powerful object manipulation capabilities …is built on the .NET Framework
  • 6. Verb-Noun PowerShell uses a Verb-Noun syntax for its Cmdlets • Get-Something • Set-Something • New-Something • Remove-Something
  • 7. Get-Command & Get-Help • While you can do a lot of the same things as the typical command prompt, use Get- Command to see available commands • Use Get-Help <cmdlet> to get help information for a cmdlet
  • 8. Using PowerShell Profiles • PowerShell uses 2 profiles, a user specific profile and a machine-wide profile… • Use profiles to pre-load scripts, functions, environmental variables, shell settings, aliases, etc.
  • 9. Script Editors & Tools • Notepad.exe (Lame) • Notepad++ (Less Lame) • Windows PowerShell ISE (Pretty Good - includes IntelliSense, Syntax highlighting) • Quest PowerGUI (Awesome – Adds advanced debugging, and other cool things – don’t worry, I’ll show you!) • Others…
  • 10. SharePoint 2010 Cmdlets • 500+ Cmdlets… • MUCH better than STSADM.exe… • Can automate complete installations and configurations… • Still doesn’t answer every scenario, leaving gaps in functionality… – Example: Get, New and Remove SharePoint Groups – no cmdlet, easy to write a custom function though…
  • 11. Creating a SharePoint Web Application using out-of-the-box PowerShell Cmdlets DEMONSTRATION
  • 12. Demo Recap • Used New-SPWebApplication to create a new SharePoint Web Application… • Stored the SPWebApplication object into the $webapp variable • Used Get-Member to view Methods and Properties associated with the Web Application
  • 13. Creating a SharePoint Site Collection using out-of-the-box PowerShell Cmdlets DEMONSTRATION TWO
  • 14. Demo Recap • Used New-SPSite to create a new SharePoint Site Collection… • Stored the SPSite object into the $site variable • Created a $web variable from $site.rootweb • Used the $web variable to change the Site Title using the SP Object Model • Used Get-History and Pipeline to create a simple script from our command history… • Cool right, but what if we could make this reusable???  (Hint: we can)
  • 15. Extending PowerShell with Scripts and Functions • PowerShell Scripts have .ps1 file extension… • Scripts and functions behave similarly if not identically, but functions are more reusable… • Scripts can reference functions and cmdlets… • Functions can include other functions within them and can also reference cmdlets…
  • 16. Using what we already learned and making it better. DEMONSTRATION THREE
  • 17. Demo Recap • Used the following cmdlets in conjunction with the pipeline to automagically build a function based on what we did in our first demonstration: – Get-History – Select-Object – Out-File • Used Quest PowerGUI to edit our function by adding Parameters, eliminating hard-coded values… • Added comment-based help from PowerGUI Snippet… • Tried out our cool, new function…
  • 18. The Power IS in the Shell, Use it Wisely! • PowerShell is VERY powerful, be aware of memory issues... • Use dispose() method for Site and Web objects, or better yet… • Use Start-SPAssignment –Global to capture all objects in the Global store, then use Stop-SPAssignment –Global to dispose of all objects…
  • 19. Get-Resources 1. TechNet for general PowerShell information… 2. The Hey, Scripting Guy! blog 3. Get-SPScripts.com 4. Gary Lapointe 5. Get-Help in a PowerShell window… 6. SharePointRyan.com (yes, my blog)…
  • 20. Got-Questions -? Ryan Dennis, MCTS, MCPD, MCITP Senior SharePoint Engineer @ ICC Microsoft Virtual Technology Specialist (vTSP) www.SharePointRyan.com @SharePointRyan linkedin.com/in/sharepointryan [email protected]

Editor's Notes

  • #3: Please add the sponsor LOGO (if it exists), name, short description and any urls if necessary to the designated areas. CITPG will add the sponsor level.
  • #12: Start from a new PowerShell Window:Create a Site Collection:$site = New-SPSite –Url http://sps.adventureworks.com –Template “CMSPUBLISHING#0” –Name “SharePoint Saturday Cincinnati” –OwnerAlias isg1085\\spfarm –SecondaryOwnerAlias isg1085\\sharepointryan –Verbose$site | gm$web = $site.rootweb$web.title = “Modified”$web.update()Get-History | Out-File c:\\scripts\\demo.ps1
  • #14: Start from a new PowerShell Window:Create a Site Collection:$site = New-SPSite –Url http://sps.adventureworks.com –Template “CMSPUBLISHING#0” –Name “SharePoint Saturday Cincinnati” –OwnerAlias isg1085\\spfarm –SecondaryOwnerAlias isg1085\\sharepointryan –Verbose$site | gm$web = $site.rootweb$web.title = “Modified”$web.update()Get-History | Out-File c:\\scripts\\demo.ps1
  • #17: Create a script first, then talk about making it reusable by adding parameters and making it a functionCreate a dummy function on the shell to show how they work, then move into PowerGUIAdd some output with Write-HostAdd comment-based help