SlideShare uma empresa Scribd logo
1 de 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

Mais conteúdo relacionado

Mais procurados

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
 

Mais procurados (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
 

Semelhante a 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
 

Semelhante a 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
 

Mais 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
 

Mais 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
 

Último

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdfChristopherTHyatt
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 

Último (20)

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 

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