Download presentation
Presentation is loading. Please wait.
1
Intro To PowerShell Jack Fruh Sharepointjack.com
2
And now a word from our Sponsors
3
Thank you #SPSTC sponsors!
4
About Me… @sharepointjack
5
SharePointJack.com Last year was a milestone year, as the site crossed the 5 unique visitors milestone. I’m pretty sure my Mom and Dad were two of them, I can only guess that my uncle Hershel and aunt Mildred were also enticed to visit the site after the yearly family Christmas newsletter went out. People still do those right?
6
Demo How to start PowerShell, The difference between “Plain” and “SharePoint” PowerShell Your first PS command: Get-Command Your first PS Program: $a = get-command $a.count()
7
Demo (cont) Turn “plain” PowerShell into “SharePoint” PowerShell with this command: Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue
8
What you should do to learn PowerShell 1)Download the PowerShell Cheat Sheet 2)Print it 3)Tape it on your desk
9
What you should do to learn PowerShell & SharePoint 1)Download the SharePoint PS Cheat Sheet 2)Print it 3)Tape it on your desk 4)Look over the SP Object Model
10
Understanding SharePoint’s internals will help greatly! Knowing the “Object Model” will go a long, long, long, long, long way towards knowing what to look for in PowerShell or what to search for on the internet when seeking help
11
SharePoint Object Model Compared to a School System SharePoint Object Model Compared to a School System SPFarm Farm is the top level in the object model. Managed via Central Admin A farm will have one or more Web Applications SPFarm Farm is the top level in the object model. Managed via Central Admin A farm will have one or more Web Applications SPWebApplication Found in IIS as an IIS website Determines the Base URL of the site Contains 1 ore more Site Collections SPWebApplication Found in IIS as an IIS website Determines the Base URL of the site Contains 1 ore more Site Collections SPSite Same as “Site Collection” An Organizational unit Can easily move a whole SPSite between Databases Each SPSite contains 1 ore more SPWEB’s SPSite Same as “Site Collection” An Organizational unit Can easily move a whole SPSite between Databases Each SPSite contains 1 ore more SPWEB’s SPWeb Where real work happens Contains Lists, libraries, Pages, etc.. SPWeb Where real work happens Contains Lists, libraries, Pages, etc.. School District School District oversees all schools in the district. Address of Office ≠ Address of School(s) A School District will have 1 or more Schools School District School District oversees all schools in the district. Address of Office ≠ Address of School(s) A School District will have 1 or more Schools School Found within the physical boundaries of the taxing school districts geographical area Has a physical address people go to. Has 1 or more Departments School Found within the physical boundaries of the taxing school districts geographical area Has a physical address people go to. Has 1 or more Departments Department A way to organize teachers and classes by purpose Math Department Athletic Department etc. Department A way to organize teachers and classes by purpose Math Department Athletic Department etc. Classroom Where learning happens Contains books, supplies, whiteboards, etc. Classroom Where learning happens Contains books, supplies, whiteboards, etc.
12
Exploring SharePoint PowerShell Get-Command *-SP* Get-help Get-Help (command) Get-help get-spweb Get-help get-spweb –detailed Get-help get-spweb –examples
13
Understanding Help Output Understanding the “Syntax” part…
14
“Pipe” output from one command to the Input of another
15
The most Common “Pipe Targets” Some-Command | Sort name, date Some-Command | Format-Table Some-Command | Select name Some-Command | Select –last 3 Some-Command | Where {$_.name –like “Jack*”}
16
Graduating from one line commands: Scripts & the “ISE” (Integrated Scripting Environment)
17
ISE Scripting Since the ISE opens “Plain”, be sure to add in the SharePoint PowerShell Snapin with Add-PSSnapin Microsoft.SharePoint.PowerShell
18
Demos & Q&A Contact info: Jack Fruh jack@sharepointjack.com Sharepointjack.com @sharepointjack
19
Example/Demo’s and Questions: Save all the WSP’s on your farm….
20
Example/Demo See how big your Content Databases Are…
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.