Suguk nottm sept 2010 share point 2010 farm design considerations
Powershell to the People #suguk
-
Upload
chris-mckinley -
Category
Technology
-
view
967 -
download
3
description
Transcript of Powershell to the People #suguk
![Page 1: Powershell to the People #suguk](https://reader034.fdocuments.in/reader034/viewer/2022051515/55388fd94a79590a7f8b4773/html5/thumbnails/1.jpg)
![Page 3: Powershell to the People #suguk](https://reader034.fdocuments.in/reader034/viewer/2022051515/55388fd94a79590a7f8b4773/html5/thumbnails/3.jpg)
PowerShell Basics
Cmdlets are in the form verb-noun
Make-coffee
Get-Process
![Page 4: Powershell to the People #suguk](https://reader034.fdocuments.in/reader034/viewer/2022051515/55388fd94a79590a7f8b4773/html5/thumbnails/4.jpg)
PowerShell Basics
Parameters added after cmdlet
Make-coffee -sugar 2
![Page 5: Powershell to the People #suguk](https://reader034.fdocuments.in/reader034/viewer/2022051515/55388fd94a79590a7f8b4773/html5/thumbnails/5.jpg)
PowerShell Basics
Pipe your data
Get-Command | where-object {$_.CommandType -like "Alias"}
![Page 6: Powershell to the People #suguk](https://reader034.fdocuments.in/reader034/viewer/2022051515/55388fd94a79590a7f8b4773/html5/thumbnails/6.jpg)
PowerShell Basics
Variables
$myVariable = “Hello World!”
Some are system such as $error or $_
![Page 7: Powershell to the People #suguk](https://reader034.fdocuments.in/reader034/viewer/2022051515/55388fd94a79590a7f8b4773/html5/thumbnails/7.jpg)
PowerShell Basics
Loops
Foreach ($object in $collection) {$object}
![Page 8: Powershell to the People #suguk](https://reader034.fdocuments.in/reader034/viewer/2022051515/55388fd94a79590a7f8b4773/html5/thumbnails/8.jpg)
Not all things are equal
Just 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
![Page 9: Powershell to the People #suguk](https://reader034.fdocuments.in/reader034/viewer/2022051515/55388fd94a79590a7f8b4773/html5/thumbnails/9.jpg)
DEMO
Some basics of PowerShell. Out-file, get-command, pipes, loops and variables.
![Page 10: Powershell to the People #suguk](https://reader034.fdocuments.in/reader034/viewer/2022051515/55388fd94a79590a7f8b4773/html5/thumbnails/10.jpg)
It’s called Windows, not Typies
ISE
Feature on the server
Windows PowerShell Integrated Scripting Environment
![Page 11: Powershell to the People #suguk](https://reader034.fdocuments.in/reader034/viewer/2022051515/55388fd94a79590a7f8b4773/html5/thumbnails/11.jpg)
• Get-SPFarm
• Get-SPWebApplication
• Get-SPSite
• Get-SPWeb
• Add-SPSolution
SP PS
![Page 12: Powershell to the People #suguk](https://reader034.fdocuments.in/reader034/viewer/2022051515/55388fd94a79590a7f8b4773/html5/thumbnails/12.jpg)
DEMO
Use of ISE. Getting SharePoint info. Updating site icons, iterating through sites. Creating and removing sites. Getting list items and properties.
![Page 13: Powershell to the People #suguk](https://reader034.fdocuments.in/reader034/viewer/2022051515/55388fd94a79590a7f8b4773/html5/thumbnails/13.jpg)
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() } }
![Page 14: Powershell to the People #suguk](https://reader034.fdocuments.in/reader034/viewer/2022051515/55388fd94a79590a7f8b4773/html5/thumbnails/14.jpg)
DEMO
Retrieve farm accounts
![Page 15: Powershell to the People #suguk](https://reader034.fdocuments.in/reader034/viewer/2022051515/55388fd94a79590a7f8b4773/html5/thumbnails/15.jpg)
Any Questions?
Resources • Guy Thomas MVP
– http://www.computerperformance.co.uk/powershell/
• Retrieve Farm Accounts – http://www.sharepointlonghorn.com/Lists/Posts/Post.aspx?ID=11
@crmckinley
![Page 16: Powershell to the People #suguk](https://reader034.fdocuments.in/reader034/viewer/2022051515/55388fd94a79590a7f8b4773/html5/thumbnails/16.jpg)
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