SlideShare une entreprise Scribd logo
1  sur  17
Getting Started with PowerShell for
SharePoint 2010 administrators
Ravikanth Chaganti
About me
• A lead engineer at Dell and a Windows PowerShell
MVP
• Developer of
– PSCodePlex
– PSRemoteFileExplorer
– Remote File Explorer PowerPack
– BITS File Transfer PowerPack
– PSSPUtils – PS SharePoint 2010 Utils on Codeplex
• Author of
– Free eBook - Layman’s guide to PowerShell 2.0 remoting
– SharePoint 2010 PowerShell Cheat sheet (powerGui.org)
– Several others in pipe
http://ravichaganti.com/blog Ravikanth@Ravichaganti.com @ravikanth
Agenda
• Part 1: Introduction to PowerShell
• Part 2: Introduction to PowerShell for
SharePoint 2010
• Q & A
http://ravichaganti.com/blog Ravikanth@Ravichaganti.com @ravikanth
Why PowerShell?
• Understand with an example:
– Calculate the size of a folder
http://ravichaganti.com/blog Ravikanth@Ravichaganti.com @ravikanth
DOS Batch PowerShell
@echo off
setLocal EnableDelayedExpansion
set /a value=0
set /a sum=0
FOR /R %1 %%I IN (*) DO (
set /a value=%%~zI/1024
set /a sum=!sum!+!value!
)
@echo Size is: !sum! k
$size=0;gci C:scripts -rec | % {
$Size+=$_.Length};$size/1KB
PowerShell Console
http://ravichaganti.com/blog Ravikanth@Ravichaganti.com @ravikanth
PowerShell ISE
http://ravichaganti.com/blog Ravikanth@Ravichaganti.com @ravikanth
Tab Completion
Extensible object model
Built-in debugger
Color coded syntax
PowerShell Cmdlets
 Pronounced as command-let
 A lightweight command
 an instance of .NET framework classes
 Use verb-noun pairs
◦ Get-Verb to list all approved verbs
http://ravichaganti.com/blog Ravikanth@Ravichaganti.com @ravikanth
Discover PowerShell
• Master these cmdlets
– Get-Command
– Get-Help
– Get-Member
• About_Topics; example:
– Get-Help about_variables
– Get-Help about_Operators
http://ravichaganti.com/blog Ravikanth@Ravichaganti.com @ravikanth
PowerShell for SharePoint
• Replaces STSADM for command-line
management
– STSADM still ships for backward compatibility
• 500+ PowerShell cmdlets
– Programs -> Microsoft SharePoint 2010 Products
-> SharePoint 2010 management Shell
– Add-PSSnapin Microsoft.SharePoint.PowerShell
• Cmdlets have SP noun prefix
– Get-Command –Noun SP*
http://ravichaganti.com/blog Ravikanth@Ravichaganti.com @ravikanth
PowerShell can do more
• More than what central administration can do
• Examples
– Backup using SQL snapshots
– Configuring RBS
– Configuring request throttling
– Several others
http://ravichaganti.com/blog Ravikanth@Ravichaganti.com @ravikanth
Things to know: Permissions
• Must have SharePoint_Shell_Access role on
SharePoint databases (both content &
configuration)
• Must be a member of WSS_ADMIN_WPG local
group on all farm servers
• Use Add-SPShellAdmin to give a user above
permissions
http://ravichaganti.com/blog Ravikanth@Ravichaganti.com @ravikanth
Things to know: Object Disposal
• Some cmdlets return huge objects and take up
large amount of memory
• Objects get disposed at the end of pipeline
– Not true for objects stored in a variable
• Use a built-in cmdlet as far as possible
– Get-SPWeb –Identity http://sp2010demo | Set-SPWeb –Description “This is my demo site”
http://ravichaganti.com/blog Ravikanth@Ravichaganti.com @ravikanth
Things to know: Object Disposal
• Use Dispose() when not using built-in cmdlets
• SharePoint 2010 provides cmdlets to
workaround this
– Start-SpAssignment
– Stop-SPAssignment
– Objects get associated to an assignment store and
get disposed when Stop-Assignment is called
http://ravichaganti.com/blog Ravikanth@Ravichaganti.com @ravikanth
Things to know: Execution Policy
• By default, PowerShell does not allow scripts to run
• Change policy with Set-ExecutionPoilicy
• Policy Settings
– Restricted (default) – scripts will not execute
– Unrestricted – scripts can execute. Unsigned scripts will
prompt user to execute
– Bypass (developer mode) – scripts can execute, no user
prompting to execute
http://ravichaganti.com/blog Ravikanth@Ravichaganti.com @ravikanth
• PowerShell Console
• PowerShell ISE
• PowerGUI AdminConsole
• PowerGUI ScriptEditor
• PowerWF
• PowerShell Plus
Tools for the job
Books & Resources
• PowerShell for Microsoft SharePoint 2010
Administrators – By Niklas Goude & Mattias Karlsson
• SharePoint 2010 PowerShell cmdlets cheat sheet –
PowerGUI.Org
• PowerShell in action, 2nd edition – Bruce Payette
• Windows management framework (PowerShell v2)
download for Windows Server 2008, Vista, XP and
Windows 2003
– http://support.microsoft.com/kb/968929
http://ravichaganti.com/blog Ravikanth@Ravichaganti.com @ravikanth
Q & A
http://ravichaganti.com/blog Ravikanth@Ravichaganti.com @ravikanth

Contenu connexe

Tendances

Best Practices for WordPress in Enterprise
Best Practices for WordPress in EnterpriseBest Practices for WordPress in Enterprise
Best Practices for WordPress in EnterpriseTaylor Lovett
 
Intro to SharePoint + PowerShell
Intro to SharePoint + PowerShellIntro to SharePoint + PowerShell
Intro to SharePoint + PowerShellRyan Dennis
 
Isomorphic WordPress Applications with NodeifyWP
Isomorphic WordPress Applications with NodeifyWPIsomorphic WordPress Applications with NodeifyWP
Isomorphic WordPress Applications with NodeifyWPTaylor Lovett
 
Node.js to the rescue
Node.js to the rescueNode.js to the rescue
Node.js to the rescueMarko Heijnen
 
Introduction to Play Framework
Introduction to Play FrameworkIntroduction to Play Framework
Introduction to Play FrameworkWarren Zhou
 
JSON REST API for WordPress
JSON REST API for WordPressJSON REST API for WordPress
JSON REST API for WordPressTaylor Lovett
 
ASP.NET Core 1.0
ASP.NET Core 1.0ASP.NET Core 1.0
ASP.NET Core 1.0Ido Flatow
 
Here Be Dragons - Debugging WordPress
Here Be Dragons - Debugging WordPressHere Be Dragons - Debugging WordPress
Here Be Dragons - Debugging WordPressRami Sayar
 
Powershell For Developers
Powershell For DevelopersPowershell For Developers
Powershell For DevelopersIdo Flatow
 
Intro to Coldfusion
Intro to ColdfusionIntro to Coldfusion
Intro to ColdfusionTerry Ryan
 
High Performance Drupal
High Performance DrupalHigh Performance Drupal
High Performance DrupalJeff Geerling
 
Selenium Tips & Tricks - StarWest 2015
Selenium Tips & Tricks - StarWest 2015Selenium Tips & Tricks - StarWest 2015
Selenium Tips & Tricks - StarWest 2015Andrew Krug
 
How Ansible Makes Automation Easy
How Ansible Makes Automation EasyHow Ansible Makes Automation Easy
How Ansible Makes Automation EasyPeter Sankauskas
 
Stress Free Deployment - Confoo 2011
Stress Free Deployment  - Confoo 2011Stress Free Deployment  - Confoo 2011
Stress Free Deployment - Confoo 2011Bachkoutou Toutou
 
Varying wordpressdevelopmentenvironment wp-campus2016
Varying wordpressdevelopmentenvironment wp-campus2016Varying wordpressdevelopmentenvironment wp-campus2016
Varying wordpressdevelopmentenvironment wp-campus2016David Brattoli
 
Multi tenant CMSes using php
Multi tenant CMSes using phpMulti tenant CMSes using php
Multi tenant CMSes using phpkae-verens
 
Unleash the power of HTTP with ASP.NET Web API
Unleash the power of HTTP with ASP.NET Web APIUnleash the power of HTTP with ASP.NET Web API
Unleash the power of HTTP with ASP.NET Web APIFilip W
 
In The Trenches With Tomster, Upgrading Ember.js & Ember Data
In The Trenches With Tomster, Upgrading Ember.js & Ember DataIn The Trenches With Tomster, Upgrading Ember.js & Ember Data
In The Trenches With Tomster, Upgrading Ember.js & Ember DataStacy London
 
Laravel Forge: Hello World to Hello Production
Laravel Forge: Hello World to Hello ProductionLaravel Forge: Hello World to Hello Production
Laravel Forge: Hello World to Hello ProductionJoe Ferguson
 

Tendances (20)

Best Practices for WordPress in Enterprise
Best Practices for WordPress in EnterpriseBest Practices for WordPress in Enterprise
Best Practices for WordPress in Enterprise
 
Intro to SharePoint + PowerShell
Intro to SharePoint + PowerShellIntro to SharePoint + PowerShell
Intro to SharePoint + PowerShell
 
Isomorphic WordPress Applications with NodeifyWP
Isomorphic WordPress Applications with NodeifyWPIsomorphic WordPress Applications with NodeifyWP
Isomorphic WordPress Applications with NodeifyWP
 
Node.js to the rescue
Node.js to the rescueNode.js to the rescue
Node.js to the rescue
 
Introduction to Play Framework
Introduction to Play FrameworkIntroduction to Play Framework
Introduction to Play Framework
 
JSON REST API for WordPress
JSON REST API for WordPressJSON REST API for WordPress
JSON REST API for WordPress
 
Fluxible
FluxibleFluxible
Fluxible
 
ASP.NET Core 1.0
ASP.NET Core 1.0ASP.NET Core 1.0
ASP.NET Core 1.0
 
Here Be Dragons - Debugging WordPress
Here Be Dragons - Debugging WordPressHere Be Dragons - Debugging WordPress
Here Be Dragons - Debugging WordPress
 
Powershell For Developers
Powershell For DevelopersPowershell For Developers
Powershell For Developers
 
Intro to Coldfusion
Intro to ColdfusionIntro to Coldfusion
Intro to Coldfusion
 
High Performance Drupal
High Performance DrupalHigh Performance Drupal
High Performance Drupal
 
Selenium Tips & Tricks - StarWest 2015
Selenium Tips & Tricks - StarWest 2015Selenium Tips & Tricks - StarWest 2015
Selenium Tips & Tricks - StarWest 2015
 
How Ansible Makes Automation Easy
How Ansible Makes Automation EasyHow Ansible Makes Automation Easy
How Ansible Makes Automation Easy
 
Stress Free Deployment - Confoo 2011
Stress Free Deployment  - Confoo 2011Stress Free Deployment  - Confoo 2011
Stress Free Deployment - Confoo 2011
 
Varying wordpressdevelopmentenvironment wp-campus2016
Varying wordpressdevelopmentenvironment wp-campus2016Varying wordpressdevelopmentenvironment wp-campus2016
Varying wordpressdevelopmentenvironment wp-campus2016
 
Multi tenant CMSes using php
Multi tenant CMSes using phpMulti tenant CMSes using php
Multi tenant CMSes using php
 
Unleash the power of HTTP with ASP.NET Web API
Unleash the power of HTTP with ASP.NET Web APIUnleash the power of HTTP with ASP.NET Web API
Unleash the power of HTTP with ASP.NET Web API
 
In The Trenches With Tomster, Upgrading Ember.js & Ember Data
In The Trenches With Tomster, Upgrading Ember.js & Ember DataIn The Trenches With Tomster, Upgrading Ember.js & Ember Data
In The Trenches With Tomster, Upgrading Ember.js & Ember Data
 
Laravel Forge: Hello World to Hello Production
Laravel Forge: Hello World to Hello ProductionLaravel Forge: Hello World to Hello Production
Laravel Forge: Hello World to Hello Production
 

Similaire à PowerShell for sharepoint 2010 administrators

Spsatx slides (widescreen)
Spsatx slides (widescreen)Spsatx slides (widescreen)
Spsatx slides (widescreen)Ryan Dennis
 
SPSNYC17 - The Wall: Overcoming SharePoint’s Site Collection Boundary
SPSNYC17 - The Wall: Overcoming SharePoint’s Site Collection BoundarySPSNYC17 - The Wall: Overcoming SharePoint’s Site Collection Boundary
SPSNYC17 - The Wall: Overcoming SharePoint’s Site Collection BoundaryJonathan Ralton
 
I6 - State of the art SharePoint PowerShell Nation 2017 - Spencer Harbar
I6 - State of the art SharePoint PowerShell Nation 2017 - Spencer HarbarI6 - State of the art SharePoint PowerShell Nation 2017 - Spencer Harbar
I6 - State of the art SharePoint PowerShell Nation 2017 - Spencer HarbarSPS Paris
 
PowerShell Introduction to Administering SharePoint On-Premises & O365
PowerShell Introduction to Administering SharePoint On-Premises & O365PowerShell Introduction to Administering SharePoint On-Premises & O365
PowerShell Introduction to Administering SharePoint On-Premises & O365Michael Greene
 
Brian Jackett: Managing SharePoint 2010 Farms with Powershell
Brian Jackett: Managing SharePoint 2010 Farms with PowershellBrian Jackett: Managing SharePoint 2010 Farms with Powershell
Brian Jackett: Managing SharePoint 2010 Farms with PowershellSharePoint Saturday NY
 
Brian Jackett: Managing SharePoint 2010 Farms with Powershell
Brian Jackett: Managing SharePoint 2010 Farms with PowershellBrian Jackett: Managing SharePoint 2010 Farms with Powershell
Brian Jackett: Managing SharePoint 2010 Farms with PowershellSharePoint Saturday NY
 
Share point development 101
Share point development 101Share point development 101
Share point development 101Becky Bertram
 
pandas.(to/from)_sql is simple but not fast
pandas.(to/from)_sql is simple but not fastpandas.(to/from)_sql is simple but not fast
pandas.(to/from)_sql is simple but not fastUwe Korn
 
SPSNE17 - The Wall: Overcoming SharePoint’s Site Collection Boundary
SPSNE17 - The Wall: Overcoming SharePoint’s Site Collection BoundarySPSNE17 - The Wall: Overcoming SharePoint’s Site Collection Boundary
SPSNE17 - The Wall: Overcoming SharePoint’s Site Collection BoundaryJonathan Ralton
 
20111110 how puppet-fits_into_your_existing_infrastructure_and_change_managem...
20111110 how puppet-fits_into_your_existing_infrastructure_and_change_managem...20111110 how puppet-fits_into_your_existing_infrastructure_and_change_managem...
20111110 how puppet-fits_into_your_existing_infrastructure_and_change_managem...garrett honeycutt
 
They why behind php frameworks
They why behind php frameworksThey why behind php frameworks
They why behind php frameworksKirk Madera
 
Microsoft SharePoint in the Workplace
Microsoft SharePoint in the WorkplaceMicrosoft SharePoint in the Workplace
Microsoft SharePoint in the WorkplaceCTE Solutions Inc.
 
Cross Site Collection Navigation with SPFX, PowerShell PnP, PnP-JS, Office UI
Cross Site Collection Navigation with SPFX, PowerShell PnP, PnP-JS, Office UICross Site Collection Navigation with SPFX, PowerShell PnP, PnP-JS, Office UI
Cross Site Collection Navigation with SPFX, PowerShell PnP, PnP-JS, Office UIThomas Daly
 
SharePoint Fundamentals (Lesson 1&2)
SharePoint Fundamentals (Lesson 1&2)SharePoint Fundamentals (Lesson 1&2)
SharePoint Fundamentals (Lesson 1&2)MJ Ferdous
 
SQL Server Integration Services Tips & Tricks
SQL Server Integration Services Tips & TricksSQL Server Integration Services Tips & Tricks
SQL Server Integration Services Tips & TricksGuillermo Caicedo
 
PowerShell Basics for Office Apps and Servers
PowerShell Basics for Office Apps and ServersPowerShell Basics for Office Apps and Servers
PowerShell Basics for Office Apps and ServersGreg McMurray
 
Day 7 - Make it Fast
Day 7 - Make it FastDay 7 - Make it Fast
Day 7 - Make it FastBarry Jones
 

Similaire à PowerShell for sharepoint 2010 administrators (20)

Spsatx slides (widescreen)
Spsatx slides (widescreen)Spsatx slides (widescreen)
Spsatx slides (widescreen)
 
SPSNYC17 - The Wall: Overcoming SharePoint’s Site Collection Boundary
SPSNYC17 - The Wall: Overcoming SharePoint’s Site Collection BoundarySPSNYC17 - The Wall: Overcoming SharePoint’s Site Collection Boundary
SPSNYC17 - The Wall: Overcoming SharePoint’s Site Collection Boundary
 
Velocity - Edge UG
Velocity - Edge UGVelocity - Edge UG
Velocity - Edge UG
 
I6 - State of the art SharePoint PowerShell Nation 2017 - Spencer Harbar
I6 - State of the art SharePoint PowerShell Nation 2017 - Spencer HarbarI6 - State of the art SharePoint PowerShell Nation 2017 - Spencer Harbar
I6 - State of the art SharePoint PowerShell Nation 2017 - Spencer Harbar
 
PowerShell Introduction to Administering SharePoint On-Premises & O365
PowerShell Introduction to Administering SharePoint On-Premises & O365PowerShell Introduction to Administering SharePoint On-Premises & O365
PowerShell Introduction to Administering SharePoint On-Premises & O365
 
Brian Jackett: Managing SharePoint 2010 Farms with Powershell
Brian Jackett: Managing SharePoint 2010 Farms with PowershellBrian Jackett: Managing SharePoint 2010 Farms with Powershell
Brian Jackett: Managing SharePoint 2010 Farms with Powershell
 
Brian Jackett: Managing SharePoint 2010 Farms with Powershell
Brian Jackett: Managing SharePoint 2010 Farms with PowershellBrian Jackett: Managing SharePoint 2010 Farms with Powershell
Brian Jackett: Managing SharePoint 2010 Farms with Powershell
 
Share point development 101
Share point development 101Share point development 101
Share point development 101
 
pandas.(to/from)_sql is simple but not fast
pandas.(to/from)_sql is simple but not fastpandas.(to/from)_sql is simple but not fast
pandas.(to/from)_sql is simple but not fast
 
SPSNE17 - The Wall: Overcoming SharePoint’s Site Collection Boundary
SPSNE17 - The Wall: Overcoming SharePoint’s Site Collection BoundarySPSNE17 - The Wall: Overcoming SharePoint’s Site Collection Boundary
SPSNE17 - The Wall: Overcoming SharePoint’s Site Collection Boundary
 
20111110 how puppet-fits_into_your_existing_infrastructure_and_change_managem...
20111110 how puppet-fits_into_your_existing_infrastructure_and_change_managem...20111110 how puppet-fits_into_your_existing_infrastructure_and_change_managem...
20111110 how puppet-fits_into_your_existing_infrastructure_and_change_managem...
 
They why behind php frameworks
They why behind php frameworksThey why behind php frameworks
They why behind php frameworks
 
Admin SharePoint 2010 with PowerShell
Admin SharePoint 2010 with PowerShellAdmin SharePoint 2010 with PowerShell
Admin SharePoint 2010 with PowerShell
 
Microsoft SharePoint in the Workplace
Microsoft SharePoint in the WorkplaceMicrosoft SharePoint in the Workplace
Microsoft SharePoint in the Workplace
 
Cross Site Collection Navigation with SPFX, PowerShell PnP, PnP-JS, Office UI
Cross Site Collection Navigation with SPFX, PowerShell PnP, PnP-JS, Office UICross Site Collection Navigation with SPFX, PowerShell PnP, PnP-JS, Office UI
Cross Site Collection Navigation with SPFX, PowerShell PnP, PnP-JS, Office UI
 
SharePoint Fundamentals (Lesson 1&2)
SharePoint Fundamentals (Lesson 1&2)SharePoint Fundamentals (Lesson 1&2)
SharePoint Fundamentals (Lesson 1&2)
 
SQL Server Integration Services Tips & Tricks
SQL Server Integration Services Tips & TricksSQL Server Integration Services Tips & Tricks
SQL Server Integration Services Tips & Tricks
 
PowerShell Basics for Office Apps and Servers
PowerShell Basics for Office Apps and ServersPowerShell Basics for Office Apps and Servers
PowerShell Basics for Office Apps and Servers
 
Power shell
Power shellPower shell
Power shell
 
Day 7 - Make it Fast
Day 7 - Make it FastDay 7 - Make it Fast
Day 7 - Make it Fast
 

Plus de Ravikanth Chaganti

Tests Driven PowerShell Learning
Tests Driven PowerShell LearningTests Driven PowerShell Learning
Tests Driven PowerShell LearningRavikanth Chaganti
 
PowerShell Data as File System
PowerShell Data as File SystemPowerShell Data as File System
PowerShell Data as File SystemRavikanth Chaganti
 
Microsoft Azure Cloud and DevOps
Microsoft Azure Cloud and DevOpsMicrosoft Azure Cloud and DevOps
Microsoft Azure Cloud and DevOpsRavikanth Chaganti
 
Using PowerShell DSC with AWS Cloud and CloudFormation
Using PowerShell DSC with AWS Cloud and CloudFormationUsing PowerShell DSC with AWS Cloud and CloudFormation
Using PowerShell DSC with AWS Cloud and CloudFormationRavikanth Chaganti
 
Developing Infrastructure Code for CI & CD
Developing Infrastructure Code for CI & CDDeveloping Infrastructure Code for CI & CD
Developing Infrastructure Code for CI & CDRavikanth Chaganti
 
PowerShell DSC Partial Configurations and Cross-node Synchronization
PowerShell DSC Partial Configurations and Cross-node SynchronizationPowerShell DSC Partial Configurations and Cross-node Synchronization
PowerShell DSC Partial Configurations and Cross-node SynchronizationRavikanth Chaganti
 
Operations Validation for Infrastructure As Code - PSConfEU 2016
Operations Validation for Infrastructure As Code - PSConfEU 2016Operations Validation for Infrastructure As Code - PSConfEU 2016
Operations Validation for Infrastructure As Code - PSConfEU 2016Ravikanth Chaganti
 
Authoring Azure Resource Manager Templates - Future Unleashed 2015
Authoring Azure Resource Manager Templates - Future Unleashed 2015Authoring Azure Resource Manager Templates - Future Unleashed 2015
Authoring Azure Resource Manager Templates - Future Unleashed 2015Ravikanth Chaganti
 
Cloud Computing for IT professionals
Cloud Computing for IT professionalsCloud Computing for IT professionals
Cloud Computing for IT professionalsRavikanth Chaganti
 
Introduction to Microsoft Azure Compute
Introduction to Microsoft Azure ComputeIntroduction to Microsoft Azure Compute
Introduction to Microsoft Azure ComputeRavikanth Chaganti
 
Cross platform configuration management using Desired State Configuration
Cross platform configuration management using Desired State ConfigurationCross platform configuration management using Desired State Configuration
Cross platform configuration management using Desired State ConfigurationRavikanth Chaganti
 
Windows Server 2012 R2 Hyper-V Replica
Windows Server 2012 R2 Hyper-V ReplicaWindows Server 2012 R2 Hyper-V Replica
Windows Server 2012 R2 Hyper-V ReplicaRavikanth Chaganti
 
Whats new in Windows Server 2012 R2 Hyper-V
Whats new in Windows Server 2012 R2 Hyper-VWhats new in Windows Server 2012 R2 Hyper-V
Whats new in Windows Server 2012 R2 Hyper-VRavikanth Chaganti
 
Configuration management comes to Windows
Configuration management comes to WindowsConfiguration management comes to Windows
Configuration management comes to WindowsRavikanth Chaganti
 
Desired state-configuration-ravikanth-august-2013-vtc india
Desired state-configuration-ravikanth-august-2013-vtc indiaDesired state-configuration-ravikanth-august-2013-vtc india
Desired state-configuration-ravikanth-august-2013-vtc indiaRavikanth Chaganti
 
Power shell saturday ravikanth
Power shell saturday  ravikanthPower shell saturday  ravikanth
Power shell saturday ravikanthRavikanth Chaganti
 

Plus de Ravikanth Chaganti (20)

Azure Bicep - An Introduction
Azure Bicep - An IntroductionAzure Bicep - An Introduction
Azure Bicep - An Introduction
 
Azure CLI 2.0 Tips and Tricks
Azure CLI 2.0 Tips and TricksAzure CLI 2.0 Tips and Tricks
Azure CLI 2.0 Tips and Tricks
 
Tests Driven PowerShell Learning
Tests Driven PowerShell LearningTests Driven PowerShell Learning
Tests Driven PowerShell Learning
 
PowerShell Data as File System
PowerShell Data as File SystemPowerShell Data as File System
PowerShell Data as File System
 
Azure at the command line
Azure at the command lineAzure at the command line
Azure at the command line
 
Microsoft Azure Cloud and DevOps
Microsoft Azure Cloud and DevOpsMicrosoft Azure Cloud and DevOps
Microsoft Azure Cloud and DevOps
 
Using PowerShell DSC with AWS Cloud and CloudFormation
Using PowerShell DSC with AWS Cloud and CloudFormationUsing PowerShell DSC with AWS Cloud and CloudFormation
Using PowerShell DSC with AWS Cloud and CloudFormation
 
Developing Infrastructure Code for CI & CD
Developing Infrastructure Code for CI & CDDeveloping Infrastructure Code for CI & CD
Developing Infrastructure Code for CI & CD
 
PowerShell DSC Partial Configurations and Cross-node Synchronization
PowerShell DSC Partial Configurations and Cross-node SynchronizationPowerShell DSC Partial Configurations and Cross-node Synchronization
PowerShell DSC Partial Configurations and Cross-node Synchronization
 
Operations Validation for Infrastructure As Code - PSConfEU 2016
Operations Validation for Infrastructure As Code - PSConfEU 2016Operations Validation for Infrastructure As Code - PSConfEU 2016
Operations Validation for Infrastructure As Code - PSConfEU 2016
 
Authoring Azure Resource Manager Templates - Future Unleashed 2015
Authoring Azure Resource Manager Templates - Future Unleashed 2015Authoring Azure Resource Manager Templates - Future Unleashed 2015
Authoring Azure Resource Manager Templates - Future Unleashed 2015
 
Cloud Computing for IT professionals
Cloud Computing for IT professionalsCloud Computing for IT professionals
Cloud Computing for IT professionals
 
Introduction to Microsoft Azure Compute
Introduction to Microsoft Azure ComputeIntroduction to Microsoft Azure Compute
Introduction to Microsoft Azure Compute
 
Cross platform configuration management using Desired State Configuration
Cross platform configuration management using Desired State ConfigurationCross platform configuration management using Desired State Configuration
Cross platform configuration management using Desired State Configuration
 
Windows Server 2012 R2 Hyper-V Replica
Windows Server 2012 R2 Hyper-V ReplicaWindows Server 2012 R2 Hyper-V Replica
Windows Server 2012 R2 Hyper-V Replica
 
Whats new in Windows Server 2012 R2 Hyper-V
Whats new in Windows Server 2012 R2 Hyper-VWhats new in Windows Server 2012 R2 Hyper-V
Whats new in Windows Server 2012 R2 Hyper-V
 
Configuration management comes to Windows
Configuration management comes to WindowsConfiguration management comes to Windows
Configuration management comes to Windows
 
Desired state-configuration-ravikanth-august-2013-vtc india
Desired state-configuration-ravikanth-august-2013-vtc indiaDesired state-configuration-ravikanth-august-2013-vtc india
Desired state-configuration-ravikanth-august-2013-vtc india
 
Power shell saturday ravikanth
Power shell saturday  ravikanthPower shell saturday  ravikanth
Power shell saturday ravikanth
 
PowerShell 3.0 workflows
PowerShell 3.0 workflowsPowerShell 3.0 workflows
PowerShell 3.0 workflows
 

Dernier

Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesZilliz
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 

Dernier (20)

Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector Databases
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 

PowerShell for sharepoint 2010 administrators

  • 1. Getting Started with PowerShell for SharePoint 2010 administrators Ravikanth Chaganti
  • 2. About me • A lead engineer at Dell and a Windows PowerShell MVP • Developer of – PSCodePlex – PSRemoteFileExplorer – Remote File Explorer PowerPack – BITS File Transfer PowerPack – PSSPUtils – PS SharePoint 2010 Utils on Codeplex • Author of – Free eBook - Layman’s guide to PowerShell 2.0 remoting – SharePoint 2010 PowerShell Cheat sheet (powerGui.org) – Several others in pipe http://ravichaganti.com/blog Ravikanth@Ravichaganti.com @ravikanth
  • 3. Agenda • Part 1: Introduction to PowerShell • Part 2: Introduction to PowerShell for SharePoint 2010 • Q & A http://ravichaganti.com/blog Ravikanth@Ravichaganti.com @ravikanth
  • 4. Why PowerShell? • Understand with an example: – Calculate the size of a folder http://ravichaganti.com/blog Ravikanth@Ravichaganti.com @ravikanth DOS Batch PowerShell @echo off setLocal EnableDelayedExpansion set /a value=0 set /a sum=0 FOR /R %1 %%I IN (*) DO ( set /a value=%%~zI/1024 set /a sum=!sum!+!value! ) @echo Size is: !sum! k $size=0;gci C:scripts -rec | % { $Size+=$_.Length};$size/1KB
  • 6. PowerShell ISE http://ravichaganti.com/blog Ravikanth@Ravichaganti.com @ravikanth Tab Completion Extensible object model Built-in debugger Color coded syntax
  • 7. PowerShell Cmdlets  Pronounced as command-let  A lightweight command  an instance of .NET framework classes  Use verb-noun pairs ◦ Get-Verb to list all approved verbs http://ravichaganti.com/blog Ravikanth@Ravichaganti.com @ravikanth
  • 8. Discover PowerShell • Master these cmdlets – Get-Command – Get-Help – Get-Member • About_Topics; example: – Get-Help about_variables – Get-Help about_Operators http://ravichaganti.com/blog Ravikanth@Ravichaganti.com @ravikanth
  • 9. PowerShell for SharePoint • Replaces STSADM for command-line management – STSADM still ships for backward compatibility • 500+ PowerShell cmdlets – Programs -> Microsoft SharePoint 2010 Products -> SharePoint 2010 management Shell – Add-PSSnapin Microsoft.SharePoint.PowerShell • Cmdlets have SP noun prefix – Get-Command –Noun SP* http://ravichaganti.com/blog Ravikanth@Ravichaganti.com @ravikanth
  • 10. PowerShell can do more • More than what central administration can do • Examples – Backup using SQL snapshots – Configuring RBS – Configuring request throttling – Several others http://ravichaganti.com/blog Ravikanth@Ravichaganti.com @ravikanth
  • 11. Things to know: Permissions • Must have SharePoint_Shell_Access role on SharePoint databases (both content & configuration) • Must be a member of WSS_ADMIN_WPG local group on all farm servers • Use Add-SPShellAdmin to give a user above permissions http://ravichaganti.com/blog Ravikanth@Ravichaganti.com @ravikanth
  • 12. Things to know: Object Disposal • Some cmdlets return huge objects and take up large amount of memory • Objects get disposed at the end of pipeline – Not true for objects stored in a variable • Use a built-in cmdlet as far as possible – Get-SPWeb –Identity http://sp2010demo | Set-SPWeb –Description “This is my demo site” http://ravichaganti.com/blog Ravikanth@Ravichaganti.com @ravikanth
  • 13. Things to know: Object Disposal • Use Dispose() when not using built-in cmdlets • SharePoint 2010 provides cmdlets to workaround this – Start-SpAssignment – Stop-SPAssignment – Objects get associated to an assignment store and get disposed when Stop-Assignment is called http://ravichaganti.com/blog Ravikanth@Ravichaganti.com @ravikanth
  • 14. Things to know: Execution Policy • By default, PowerShell does not allow scripts to run • Change policy with Set-ExecutionPoilicy • Policy Settings – Restricted (default) – scripts will not execute – Unrestricted – scripts can execute. Unsigned scripts will prompt user to execute – Bypass (developer mode) – scripts can execute, no user prompting to execute http://ravichaganti.com/blog Ravikanth@Ravichaganti.com @ravikanth
  • 15. • PowerShell Console • PowerShell ISE • PowerGUI AdminConsole • PowerGUI ScriptEditor • PowerWF • PowerShell Plus Tools for the job
  • 16. Books & Resources • PowerShell for Microsoft SharePoint 2010 Administrators – By Niklas Goude & Mattias Karlsson • SharePoint 2010 PowerShell cmdlets cheat sheet – PowerGUI.Org • PowerShell in action, 2nd edition – Bruce Payette • Windows management framework (PowerShell v2) download for Windows Server 2008, Vista, XP and Windows 2003 – http://support.microsoft.com/kb/968929 http://ravichaganti.com/blog Ravikanth@Ravichaganti.com @ravikanth
  • 17. Q & A http://ravichaganti.com/blog Ravikanth@Ravichaganti.com @ravikanth