About Chris McKinley @crmckinley chris@sharepointedutech.com
PowerShell BasicsCmdlets are in the form verb-noun  Make-coffee  Get-Process
PowerShell BasicsParameters added after cmdlet  Make-coffee -sugar 2
PowerShell BasicsPipe your data  Get-Command | where-object  {$_.CommandType -like "Alias"}
PowerShell BasicsVariables  $myVariable = “Hello World!”  Some are system such as $error or $_
PowerShell BasicsLoops Foreach ($object in $collection) {$object}
Not all things are equalJust watch out for –eq –gt –lt  They are not the same as = > <    Operator Description       -eq  ...
Some basics of PowerShell. Out-file, get-command, pipes, loops andvariables.DEMO
It’s called Windows,      not TypiesISE Feature on the server      Windows PowerShell Integrated Scripting      Environment
SP PS•   Get-SPFarm•   Get-SPWebApplication•   Get-SPSite•   Get-SPWeb• Add-SPSolution
Use of ISE. Getting SharePoint info. Updating site icons, iteratingthrough sites. Creating and removing sites. Getting lis...
Nah, just Bing it. • Do you really know what that script is doing?$web = Get-SPWeb "http://mywebapp/somesite/stuff"foreach...
Retrieve farm accountsDEMO
Any Questions?             @crmckinley             chris@sharepointedutech.com                            Resources• Guy T...
One last thing…• Submit an idea for a custom SharePoint 2010  web part and you are in with a chance of us  building it for...
Powershell to the People #suguk
Upcoming SlideShare
Loading in …5
×

Powershell to the People #suguk

911 views
831 views

Published on

Slide deck from #suguk meeting 24th May 2012. Powershell to the people by @crmckinley

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
911
On SlideShare
0
From Embeds
0
Number of Embeds
80
Actions
Shares
0
Downloads
10
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Powershell to the People #suguk

  1. 1. About Chris McKinley @crmckinley chris@sharepointedutech.com
  2. 2. PowerShell BasicsCmdlets are in the form verb-noun Make-coffee Get-Process
  3. 3. PowerShell BasicsParameters added after cmdlet Make-coffee -sugar 2
  4. 4. PowerShell BasicsPipe your data Get-Command | where-object {$_.CommandType -like "Alias"}
  5. 5. PowerShell BasicsVariables $myVariable = “Hello World!” Some are system such as $error or $_
  6. 6. PowerShell BasicsLoops Foreach ($object in $collection) {$object}
  7. 7. Not all things are equalJust watch out for –eq –gt –lt They are not the same as = > < Operator Description -eq Equal to -lt Less than -gt Greater than -ge Greater than or Eqaul to -le Less than or equal to -ne Not equal to
  8. 8. Some basics of PowerShell. Out-file, get-command, pipes, loops andvariables.DEMO
  9. 9. It’s called Windows, not TypiesISE Feature on the server Windows PowerShell Integrated Scripting Environment
  10. 10. SP PS• Get-SPFarm• Get-SPWebApplication• Get-SPSite• Get-SPWeb• Add-SPSolution
  11. 11. Use of ISE. Getting SharePoint info. Updating site icons, iteratingthrough sites. Creating and removing sites. Getting list items andproperties.DEMO
  12. 12. Nah, just Bing it. • Do you really know what that script is doing?$web = Get-SPWeb "http://mywebapp/somesite/stuff"foreach ($i in $web.Lists){ if($i.Description = "My Test Calendar") { $i.Delete() }}
  13. 13. Retrieve farm accountsDEMO
  14. 14. Any Questions? @crmckinley chris@sharepointedutech.com Resources• Guy Thomas MVP – http://www.computerperformance.co.uk/powershell/• Retrieve Farm Accounts – http://www.sharepointlonghorn.com/Lists/Posts/Post.aspx?ID=11
  15. 15. One last thing…• Submit an idea for a custom SharePoint 2010 web part and you are in with a chance of us building it for you for free!• http://www.SharePointEduTech.com• http://tinyurl.com/spetwp

×