SlideShare una empresa de Scribd logo
1 de 30
MAKING LIFE EASIER
WITH POWERSHELL



    November 5, 2011
Special Thanks to Our Sponsors
SharePint
Everyone is invited to SharePint
Immediately following SharePoint Saturday Richmond
(or around 6:20 PM)


Meet at aloft Richmond West
3939 Duckling Drive
Glen Allen, VA 23060
(down the street from Dave & Buster’s)

Then we will hop to the next location
and the next within walking distance!

SharePint: a gathering of SharePoint enthusiasts for fun, food, and drink.
AGENDA

        •   What is PowerShell
        •   Working with PowerShell
        •   When to Use PowerShell
        •   Top 10 SharePoint 2010 Cmdlets
        •   Using the PowerShell Pipeline
        •   User Scenarios
        •   Tools & Resources




11/7/2011              Making Life Easier with PowerShell   4
Core Concepts

        WHAT IS POWERSHELL


11/7/2011               Making Life Easier with PowerShell   5
WHAT IS POWERSHELL

        •   Microsoft task automation framework built on the .NET framework
             • Command-line shell
             • Scripting language (*.ps1)
        •   Common “shell” to Microsoft technologies (AD, SQL, SP, Server, etc.)
        •   Full access to COM (Component Object Model) and WMI (Windows
            Management Instrumentation) for local and remote system
            management
        •   Replacement to STSADM (deprecated)
        •   PowerShell > STSADM
             • All STSADM operations have a PowerShell equivalent
             • Integrated support for multiple platforms/services (not SP specific)
             • Easily Extendable


11/7/2011               Making Life Easier with PowerShell   6
Core Concepts

        WORKING WITH POWERSHELL


11/7/2011               Making Life Easier with PowerShell   7
POWERSHELL SNAP-INS

        •   PowerShell snap-in registers sets of cmdlets and/or providers,
            extending the default functionality of the shell
        •   Similar to a web browser plug-in
        •   Added and removed as needed during user session




11/7/2011              Making Life Easier with PowerShell   8
POWERSHELL CMDLETS

        •   A cmdlet (“command-let”) is a specific command executed in the
            PowerShell environment
        •   Following a common {verb}-{noun} naming convention, cmdlet
            functions are typically easily understood, ie: Add-PSSnapin, Get-
            SPWeb, etc.
        •   Used like a function, cmdlets take one or more input
            parameters/objects, and output objects or arrays of objects
        •   Cmdlets can be piped together, allowing the output object of one to
            become the input object of another
        •   Objects are always processed individually, if multiple input objects are
            specified, each object will be fully processed before the next is begun




11/7/2011               Making Life Easier with PowerShell   9
WHEN TO USE POWERSHELL

        •   Making life “easier” with PowerShell should equate to increased
            efficiency, lower cost, and lower turnaround
        •   Identify those processes which are repetitive in nature or those that
            require extended “hands-on” time




11/7/2011               Making Life Easier with PowerShell   10
GETTING STARTED


        SharePoint 2010
        Management Shell
        PowerShell with the
        SharePoint Snap-in Loaded




11/7/2011              Making Life Easier with PowerShell   11
STARTING POWERSHELL


        PowerShell 2.0




11/7/2011                Making Life Easier with PowerShell   12
Demonstration

        CREATE A POWERSHELL PROFILE


11/7/2011               Making Life Easier with PowerShell   13
SharePoint 2010

        TOP 10 POWERSHELL CMDLETS


11/7/2011             Making Life Easier with PowerShell   14
GET-HELP

        •   Overview
            • Displays help about Windows PowerShell cmdlets and concepts


        •   Examples
            • Get-Help {cmdlet}
            • Get-Help Test-Path
            • Get-Help Test-Path -Detailed
            • Get-Help Test-Path –Examples
            • Get-Help {topic}
            • Get-Help Snapin




11/7/2011              Making Life Easier with PowerShell   15
GET-MEMBER

        •   Overview
            • Gets the properties and methods of objects. Specify an object
              using the InputObject parameter, or pipe an object to Get-Member.


        •   Examples
            • Get-Member –InputObject $object
            • $object | Get-Member




11/7/2011              Making Life Easier with PowerShell   16
GET-SPFARM

        •   Overview
            • Returns the local SharePoint farm.


        •   Examples
            • Get-SPFarm
            • $farm = Get-SPFarm
              $farm.Properties




11/7/2011              Making Life Easier with PowerShell   17
GET-SPWEBAPPLICATION

        •   Overview
            • Returns all web applications that match the given criteria. If no
              identity is specified, all web applications are returned. The Central
              Administration web application is ignored unless specified directly
              or the IncludeCentralAdministration flag is specified.


        •   Examples
            • Get-SPWebApplication
            • Get-SPWebApplication –IncludeCentralAdministration
            • Get-SPWebApplication http://intranet




11/7/2011              Making Life Easier with PowerShell   18
GET-SPSITE

        •   Overview
            • Returns all the site collections that match the given criteria. If no
              identity is specified, the farm is scope is used.


        •   Examples
            • Get-SPSite
            • Get-SPSite http://intranet
            • Get-SPSite http://intranet/depts/facilities




11/7/2011              Making Life Easier with PowerShell   19
GET-SPWEB

        •   Overview
            • Returns all subsites that match the given criteria.


        •   Examples
            • Get-SPWeb http://intranet/depts/HR/benefits
            • Get-SPWeb http://intranet/depts/HR/*
            • Get-SPWeb http://intranet/* –filter {$_.Template –eq “STS#0”}




11/7/2011              Making Life Easier with PowerShell   20
GET-SPSERVICEAPPLICATION

        •   Overview
            • Returns the specified service application. If no service application
              is specified, all are returned.


        •   Examples
            • Get-SPServiceApplication
            • Get-SPServiceApplication | select Name, Status




11/7/2011              Making Life Easier with PowerShell   21
GET-SPCONTENTDATABASE

        •   Overview
            • Returns one or more content databases.


        •   Examples
            • Get-SPContentDatabase
            • Get-SPContentDatabase –WebApplication http://intranet
            • Get-SPContentDatabase –Site http://intranet




11/7/2011              Making Life Easier with PowerShell   22
TEST-SPCONTENTDATABASE

        •   Overview
            • Tests a content database against a web application to verify all
              customizations referenced within the content database are also
              installed in the web application. Content databases do not need to
              be mounted for validation to complete.


        •   Examples
            • Test-SPContentDatabase –name Lab_Content_Intranet
                   –WebApplication http://intranet




11/7/2011              Making Life Easier with PowerShell   23
EXPORT-CLIXML & EXPORT-CSV

        •   Overview                                        •   Overview
            • Creates an XML-based                              • Converts objects into a
              representation of an                                series of comma-
              object or objects & stores                          separated value strings &
              in a file.                                          saves file.


        •   Examples                                        •   Examples
            • $sites = Get-SPSite                               • $sites = Get-SPSite
              Export-Clixml -InputObject                          Export-CSV -InputObject
                  $sites -Path                                        $sites -Path
              c:sites.xml                                        c:sites.csv
            • Get-SPSite | Export-Clixml                        • Get-SPSite | Export-CSV
                c:sites.xml                                        c:sites.csvs



11/7/2011              Making Life Easier with PowerShell           24
Demonstration

        LIST ALL SHAREPOINT CMDLETS


11/7/2011               Making Life Easier with PowerShell   25
POWERSHELL PIPELINE

        •   The use of the PowerShell Pipeline allows the output object of one cmdlet
            to become the input object of another
        •   “Piping” is performed by using the pipe character “ | ” between cmdlets
        •   Applies to native cmdlets (such as sorting, logical operations, and data
            manipulation) and functional cmdlets (such as those for SharePoint)

             • Logical Example:
                Get-SPContentDatabase -WebApplication http://intranet | Where
                {$_.CurrentSiteCount -gt 5}

             • Functional Example:
                Get-SPSite http://intranet | Get-SPWeb | Enable-SPFeature -Identity
                “MyFeature”




11/7/2011               Making Life Easier with PowerShell   26
Demonstration

        USER SCENARIOS


11/7/2011               Making Life Easier with PowerShell   27
TOOLS & RESOURCES

        •   Tools
            • Windows PowerShell Integrated Scripting Environment (ISE)
            • Idera PowerShell Plus (free trial available)
        •   Resources
            • STSADM -> PowerShell Mapping
              http://technet.microsoft.com/en-us/library/ff621081.aspx
            • Scripting with Windows PowerShell (5 part webcast series)
              http://technet.microsoft.com/en-us/scriptcenter/dd742419
            • PowerShell Power Hour (monthly lunchtime webcasts)
              http://idera.com/Education/PowerShell-Webcasts/
            • Automating Microsoft SharePoint 2010 Administration with Windows
              PowerShell 2.0. Gary Lapointe, Shannon Bray
            • Automating Microsoft Windows Server 2008 R2 Administration with
              Windows PowerShell 2.0. Matthew Hester, Sarah Dutkiewicz



11/7/2011               Making Life Easier with PowerShell   28
QUESTIONS?
MICHAEL GREENE


@webdes03   mike-greene.com

Más contenido relacionado

La actualidad más candente

Data Pipeline Management Framework on Oozie
Data Pipeline Management Framework on OozieData Pipeline Management Framework on Oozie
Data Pipeline Management Framework on OozieShareThis
 
Atlanta JUG - Integrating Spring Batch and Spring Integration
Atlanta JUG - Integrating Spring Batch and Spring IntegrationAtlanta JUG - Integrating Spring Batch and Spring Integration
Atlanta JUG - Integrating Spring Batch and Spring IntegrationGunnar Hillert
 
Plone pas.plugins.ldap user/group search
Plone pas.plugins.ldap user/group searchPlone pas.plugins.ldap user/group search
Plone pas.plugins.ldap user/group searchfredvd
 
Apache Cayenne for WO Devs
Apache Cayenne for WO DevsApache Cayenne for WO Devs
Apache Cayenne for WO DevsWO Community
 
Oozie HUG May12
Oozie HUG May12Oozie HUG May12
Oozie HUG May12mislam77
 
Access Data from XPages with the Relational Controls
Access Data from XPages with the Relational ControlsAccess Data from XPages with the Relational Controls
Access Data from XPages with the Relational ControlsTeamstudio
 
Using ActiveObjects in Atlassian Plugins
Using ActiveObjects in Atlassian PluginsUsing ActiveObjects in Atlassian Plugins
Using ActiveObjects in Atlassian PluginsAtlassian
 
Strategies and Tips for Building Enterprise Drupal Applications - PNWDS 2013
Strategies and Tips for Building Enterprise Drupal Applications - PNWDS 2013Strategies and Tips for Building Enterprise Drupal Applications - PNWDS 2013
Strategies and Tips for Building Enterprise Drupal Applications - PNWDS 2013Mack Hardy
 
Batching and Java EE (jdk.io)
Batching and Java EE (jdk.io)Batching and Java EE (jdk.io)
Batching and Java EE (jdk.io)Ryan Cuprak
 
RESTful web service with JBoss Fuse
RESTful web service with JBoss FuseRESTful web service with JBoss Fuse
RESTful web service with JBoss Fuseejlp12
 
Alfresco Content Modelling and Policy Behaviours
Alfresco Content Modelling and Policy BehavioursAlfresco Content Modelling and Policy Behaviours
Alfresco Content Modelling and Policy BehavioursJ V
 
Oozie towards zero downtime
Oozie towards zero downtimeOozie towards zero downtime
Oozie towards zero downtimeDataWorks Summit
 
Apache Manager Table of Contents
Apache Manager Table of ContentsApache Manager Table of Contents
Apache Manager Table of Contentswebhostingguy
 
MWLUG 2015 - AD114 Take Your XPages Development to the Next Level
MWLUG 2015 - AD114 Take Your XPages Development to the Next LevelMWLUG 2015 - AD114 Take Your XPages Development to the Next Level
MWLUG 2015 - AD114 Take Your XPages Development to the Next Levelbalassaitis
 
Liquibase for java developers
Liquibase for java developersLiquibase for java developers
Liquibase for java developersIllia Seleznov
 
Triple-E’class Continuous Delivery with Hudson, Maven, Kokki and PyDev
Triple-E’class Continuous Delivery with Hudson, Maven, Kokki and PyDevTriple-E’class Continuous Delivery with Hudson, Maven, Kokki and PyDev
Triple-E’class Continuous Delivery with Hudson, Maven, Kokki and PyDevWerner Keil
 
Arun Gupta: London Java Community: Java EE 6 and GlassFish 3
Arun Gupta: London Java Community: Java EE 6 and GlassFish 3 Arun Gupta: London Java Community: Java EE 6 and GlassFish 3
Arun Gupta: London Java Community: Java EE 6 and GlassFish 3 Skills Matter
 
Weblogic Console Customization
Weblogic Console CustomizationWeblogic Console Customization
Weblogic Console CustomizationPeter van Nes
 
Best practices for share point solution deployment
Best practices for share point solution deploymentBest practices for share point solution deployment
Best practices for share point solution deploymentSalaudeen Rajack
 

La actualidad más candente (20)

Data Pipeline Management Framework on Oozie
Data Pipeline Management Framework on OozieData Pipeline Management Framework on Oozie
Data Pipeline Management Framework on Oozie
 
Atlanta JUG - Integrating Spring Batch and Spring Integration
Atlanta JUG - Integrating Spring Batch and Spring IntegrationAtlanta JUG - Integrating Spring Batch and Spring Integration
Atlanta JUG - Integrating Spring Batch and Spring Integration
 
Plone pas.plugins.ldap user/group search
Plone pas.plugins.ldap user/group searchPlone pas.plugins.ldap user/group search
Plone pas.plugins.ldap user/group search
 
Oozie at Yahoo
Oozie at YahooOozie at Yahoo
Oozie at Yahoo
 
Apache Cayenne for WO Devs
Apache Cayenne for WO DevsApache Cayenne for WO Devs
Apache Cayenne for WO Devs
 
Oozie HUG May12
Oozie HUG May12Oozie HUG May12
Oozie HUG May12
 
Access Data from XPages with the Relational Controls
Access Data from XPages with the Relational ControlsAccess Data from XPages with the Relational Controls
Access Data from XPages with the Relational Controls
 
Using ActiveObjects in Atlassian Plugins
Using ActiveObjects in Atlassian PluginsUsing ActiveObjects in Atlassian Plugins
Using ActiveObjects in Atlassian Plugins
 
Strategies and Tips for Building Enterprise Drupal Applications - PNWDS 2013
Strategies and Tips for Building Enterprise Drupal Applications - PNWDS 2013Strategies and Tips for Building Enterprise Drupal Applications - PNWDS 2013
Strategies and Tips for Building Enterprise Drupal Applications - PNWDS 2013
 
Batching and Java EE (jdk.io)
Batching and Java EE (jdk.io)Batching and Java EE (jdk.io)
Batching and Java EE (jdk.io)
 
RESTful web service with JBoss Fuse
RESTful web service with JBoss FuseRESTful web service with JBoss Fuse
RESTful web service with JBoss Fuse
 
Alfresco Content Modelling and Policy Behaviours
Alfresco Content Modelling and Policy BehavioursAlfresco Content Modelling and Policy Behaviours
Alfresco Content Modelling and Policy Behaviours
 
Oozie towards zero downtime
Oozie towards zero downtimeOozie towards zero downtime
Oozie towards zero downtime
 
Apache Manager Table of Contents
Apache Manager Table of ContentsApache Manager Table of Contents
Apache Manager Table of Contents
 
MWLUG 2015 - AD114 Take Your XPages Development to the Next Level
MWLUG 2015 - AD114 Take Your XPages Development to the Next LevelMWLUG 2015 - AD114 Take Your XPages Development to the Next Level
MWLUG 2015 - AD114 Take Your XPages Development to the Next Level
 
Liquibase for java developers
Liquibase for java developersLiquibase for java developers
Liquibase for java developers
 
Triple-E’class Continuous Delivery with Hudson, Maven, Kokki and PyDev
Triple-E’class Continuous Delivery with Hudson, Maven, Kokki and PyDevTriple-E’class Continuous Delivery with Hudson, Maven, Kokki and PyDev
Triple-E’class Continuous Delivery with Hudson, Maven, Kokki and PyDev
 
Arun Gupta: London Java Community: Java EE 6 and GlassFish 3
Arun Gupta: London Java Community: Java EE 6 and GlassFish 3 Arun Gupta: London Java Community: Java EE 6 and GlassFish 3
Arun Gupta: London Java Community: Java EE 6 and GlassFish 3
 
Weblogic Console Customization
Weblogic Console CustomizationWeblogic Console Customization
Weblogic Console Customization
 
Best practices for share point solution deployment
Best practices for share point solution deploymentBest practices for share point solution deployment
Best practices for share point solution deployment
 

Destacado

Making Life Easier with PowerShell (SPSATL 2012)
Making Life Easier with PowerShell (SPSATL 2012)Making Life Easier with PowerShell (SPSATL 2012)
Making Life Easier with PowerShell (SPSATL 2012)Michael Greene
 
SharePoint Branding Best Bets (SharePoint Saturday Richmond, 2013)
SharePoint Branding Best Bets (SharePoint Saturday Richmond, 2013)SharePoint Branding Best Bets (SharePoint Saturday Richmond, 2013)
SharePoint Branding Best Bets (SharePoint Saturday Richmond, 2013)Michael Greene
 
ATLSPUG - SharePoint Branding Best Bets
ATLSPUG - SharePoint Branding Best BetsATLSPUG - SharePoint Branding Best Bets
ATLSPUG - SharePoint Branding Best BetsMichael Greene
 
Anatomy of an Intranet (SPSATL 2014)
Anatomy of an Intranet (SPSATL 2014)Anatomy of an Intranet (SPSATL 2014)
Anatomy of an Intranet (SPSATL 2014)Michael Greene
 
Anatomy of an Intranet (Triangle SharePoint User Group) October 2016
Anatomy of an Intranet (Triangle SharePoint User Group) October 2016Anatomy of an Intranet (Triangle SharePoint User Group) October 2016
Anatomy of an Intranet (Triangle SharePoint User Group) October 2016Michael Greene
 
Anatomy of an Intranet (Triangle SharePoint User Group) January 2016
Anatomy of an Intranet (Triangle SharePoint User Group) January 2016Anatomy of an Intranet (Triangle SharePoint User Group) January 2016
Anatomy of an Intranet (Triangle SharePoint User Group) January 2016Michael Greene
 
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
 

Destacado (7)

Making Life Easier with PowerShell (SPSATL 2012)
Making Life Easier with PowerShell (SPSATL 2012)Making Life Easier with PowerShell (SPSATL 2012)
Making Life Easier with PowerShell (SPSATL 2012)
 
SharePoint Branding Best Bets (SharePoint Saturday Richmond, 2013)
SharePoint Branding Best Bets (SharePoint Saturday Richmond, 2013)SharePoint Branding Best Bets (SharePoint Saturday Richmond, 2013)
SharePoint Branding Best Bets (SharePoint Saturday Richmond, 2013)
 
ATLSPUG - SharePoint Branding Best Bets
ATLSPUG - SharePoint Branding Best BetsATLSPUG - SharePoint Branding Best Bets
ATLSPUG - SharePoint Branding Best Bets
 
Anatomy of an Intranet (SPSATL 2014)
Anatomy of an Intranet (SPSATL 2014)Anatomy of an Intranet (SPSATL 2014)
Anatomy of an Intranet (SPSATL 2014)
 
Anatomy of an Intranet (Triangle SharePoint User Group) October 2016
Anatomy of an Intranet (Triangle SharePoint User Group) October 2016Anatomy of an Intranet (Triangle SharePoint User Group) October 2016
Anatomy of an Intranet (Triangle SharePoint User Group) October 2016
 
Anatomy of an Intranet (Triangle SharePoint User Group) January 2016
Anatomy of an Intranet (Triangle SharePoint User Group) January 2016Anatomy of an Intranet (Triangle SharePoint User Group) January 2016
Anatomy of an Intranet (Triangle SharePoint User Group) January 2016
 
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
 

Similar a Making Life Easier with PowerShell - SPSRIC

Spsatx slides (widescreen)
Spsatx slides (widescreen)Spsatx slides (widescreen)
Spsatx slides (widescreen)Ryan Dennis
 
PowerShellForDBDevelopers
PowerShellForDBDevelopersPowerShellForDBDevelopers
PowerShellForDBDevelopersBryan Cafferky
 
Developing Kafka Streams Applications with Upgradability in Mind with Neil Bu...
Developing Kafka Streams Applications with Upgradability in Mind with Neil Bu...Developing Kafka Streams Applications with Upgradability in Mind with Neil Bu...
Developing Kafka Streams Applications with Upgradability in Mind with Neil Bu...HostedbyConfluent
 
Intro to SharePoint + PowerShell
Intro to SharePoint + PowerShellIntro to SharePoint + PowerShell
Intro to SharePoint + PowerShellRyan Dennis
 
Power shell for sp admins
Power shell for sp adminsPower shell for sp admins
Power shell for sp adminsRick Taylor
 
ZZ BC#7 asp.net mvc practice and guideline by NineMvp
ZZ BC#7 asp.net mvc practice and guideline by NineMvpZZ BC#7 asp.net mvc practice and guideline by NineMvp
ZZ BC#7 asp.net mvc practice and guideline by NineMvpChalermpon Areepong
 
API-Testing-SOAPUI-1.pptx
API-Testing-SOAPUI-1.pptxAPI-Testing-SOAPUI-1.pptx
API-Testing-SOAPUI-1.pptxamarnathdeo
 
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
 
Introduction to PowerShell for SharePoint Admins and Developers
Introduction to PowerShell for SharePoint Admins and DevelopersIntroduction to PowerShell for SharePoint Admins and Developers
Introduction to PowerShell for SharePoint Admins and DevelopersMichael Blumenthal (Microsoft MVP)
 
PowerShell for SharePoint Admins
PowerShell for SharePoint AdminsPowerShell for SharePoint Admins
PowerShell for SharePoint AdminsRick Taylor
 
XPages -Beyond the Basics
XPages -Beyond the BasicsXPages -Beyond the Basics
XPages -Beyond the BasicsUlrich Krause
 
SplunkLive! Developer Breakout
SplunkLive! Developer BreakoutSplunkLive! Developer Breakout
SplunkLive! Developer BreakoutSplunk
 
Build Your First SharePoint Framework Webpart
Build Your First SharePoint Framework WebpartBuild Your First SharePoint Framework Webpart
Build Your First SharePoint Framework WebpartEric Overfield
 
UKLUG 2012 - XPages, Beyond the basics
UKLUG 2012 - XPages, Beyond the basicsUKLUG 2012 - XPages, Beyond the basics
UKLUG 2012 - XPages, Beyond the basicsUlrich Krause
 
Build Automation of PHP Applications
Build Automation of PHP ApplicationsBuild Automation of PHP Applications
Build Automation of PHP ApplicationsPavan Kumar N
 
Introduction to PowerShell for SharePoint Admins and Developers - SharePoint ...
Introduction to PowerShell for SharePoint Admins and Developers - SharePoint ...Introduction to PowerShell for SharePoint Admins and Developers - SharePoint ...
Introduction to PowerShell for SharePoint Admins and Developers - SharePoint ...Michael Blumenthal (Microsoft MVP)
 
Introduction to SoapUI day 1
Introduction to SoapUI day 1Introduction to SoapUI day 1
Introduction to SoapUI day 1Qualitest
 
Soap UI - Getting started
Soap UI - Getting startedSoap UI - Getting started
Soap UI - Getting startedQualitest
 
ZZ BC#7.5 asp.net mvc practice and guideline refresh!
ZZ BC#7.5 asp.net mvc practice  and guideline refresh! ZZ BC#7.5 asp.net mvc practice  and guideline refresh!
ZZ BC#7.5 asp.net mvc practice and guideline refresh! Chalermpon Areepong
 

Similar a Making Life Easier with PowerShell - SPSRIC (20)

Spsatx slides (widescreen)
Spsatx slides (widescreen)Spsatx slides (widescreen)
Spsatx slides (widescreen)
 
PowerShellForDBDevelopers
PowerShellForDBDevelopersPowerShellForDBDevelopers
PowerShellForDBDevelopers
 
Developing Kafka Streams Applications with Upgradability in Mind with Neil Bu...
Developing Kafka Streams Applications with Upgradability in Mind with Neil Bu...Developing Kafka Streams Applications with Upgradability in Mind with Neil Bu...
Developing Kafka Streams Applications with Upgradability in Mind with Neil Bu...
 
Intro to SharePoint + PowerShell
Intro to SharePoint + PowerShellIntro to SharePoint + PowerShell
Intro to SharePoint + PowerShell
 
Power shell for sp admins
Power shell for sp adminsPower shell for sp admins
Power shell for sp admins
 
ZZ BC#7 asp.net mvc practice and guideline by NineMvp
ZZ BC#7 asp.net mvc practice and guideline by NineMvpZZ BC#7 asp.net mvc practice and guideline by NineMvp
ZZ BC#7 asp.net mvc practice and guideline by NineMvp
 
API-Testing-SOAPUI-1.pptx
API-Testing-SOAPUI-1.pptxAPI-Testing-SOAPUI-1.pptx
API-Testing-SOAPUI-1.pptx
 
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
 
Introduction to PowerShell for SharePoint Admins and Developers
Introduction to PowerShell for SharePoint Admins and DevelopersIntroduction to PowerShell for SharePoint Admins and Developers
Introduction to PowerShell for SharePoint Admins and Developers
 
PowerShell for SharePoint Admins
PowerShell for SharePoint AdminsPowerShell for SharePoint Admins
PowerShell for SharePoint Admins
 
XPages -Beyond the Basics
XPages -Beyond the BasicsXPages -Beyond the Basics
XPages -Beyond the Basics
 
SplunkLive! Developer Breakout
SplunkLive! Developer BreakoutSplunkLive! Developer Breakout
SplunkLive! Developer Breakout
 
Build Your First SharePoint Framework Webpart
Build Your First SharePoint Framework WebpartBuild Your First SharePoint Framework Webpart
Build Your First SharePoint Framework Webpart
 
UKLUG 2012 - XPages, Beyond the basics
UKLUG 2012 - XPages, Beyond the basicsUKLUG 2012 - XPages, Beyond the basics
UKLUG 2012 - XPages, Beyond the basics
 
Build Automation of PHP Applications
Build Automation of PHP ApplicationsBuild Automation of PHP Applications
Build Automation of PHP Applications
 
Introduction to PowerShell for SharePoint Admins and Developers - SharePoint ...
Introduction to PowerShell for SharePoint Admins and Developers - SharePoint ...Introduction to PowerShell for SharePoint Admins and Developers - SharePoint ...
Introduction to PowerShell for SharePoint Admins and Developers - SharePoint ...
 
Introduction to SoapUI day 1
Introduction to SoapUI day 1Introduction to SoapUI day 1
Introduction to SoapUI day 1
 
Soap UI - Getting started
Soap UI - Getting startedSoap UI - Getting started
Soap UI - Getting started
 
Using the Splunk Java SDK
Using the Splunk Java SDKUsing the Splunk Java SDK
Using the Splunk Java SDK
 
ZZ BC#7.5 asp.net mvc practice and guideline refresh!
ZZ BC#7.5 asp.net mvc practice  and guideline refresh! ZZ BC#7.5 asp.net mvc practice  and guideline refresh!
ZZ BC#7.5 asp.net mvc practice and guideline refresh!
 

Último

VoIP Service and Marketing using Odoo and Asterisk PBX
VoIP Service and Marketing using Odoo and Asterisk PBXVoIP Service and Marketing using Odoo and Asterisk PBX
VoIP Service and Marketing using Odoo and Asterisk PBXTarek Kalaji
 
COMPUTER 10: Lesson 7 - File Storage and Online Collaboration
COMPUTER 10: Lesson 7 - File Storage and Online CollaborationCOMPUTER 10: Lesson 7 - File Storage and Online Collaboration
COMPUTER 10: Lesson 7 - File Storage and Online Collaborationbruanjhuli
 
UiPath Studio Web workshop series - Day 6
UiPath Studio Web workshop series - Day 6UiPath Studio Web workshop series - Day 6
UiPath Studio Web workshop series - Day 6DianaGray10
 
Computer 10: Lesson 10 - Online Crimes and Hazards
Computer 10: Lesson 10 - Online Crimes and HazardsComputer 10: Lesson 10 - Online Crimes and Hazards
Computer 10: Lesson 10 - Online Crimes and HazardsSeth Reyes
 
Secure your environment with UiPath and CyberArk technologies - Session 1
Secure your environment with UiPath and CyberArk technologies - Session 1Secure your environment with UiPath and CyberArk technologies - Session 1
Secure your environment with UiPath and CyberArk technologies - Session 1DianaGray10
 
The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...
The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...
The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...Aggregage
 
COMPUTER 10 Lesson 8 - Building a Website
COMPUTER 10 Lesson 8 - Building a WebsiteCOMPUTER 10 Lesson 8 - Building a Website
COMPUTER 10 Lesson 8 - Building a Websitedgelyza
 
UiPath Platform: The Backend Engine Powering Your Automation - Session 1
UiPath Platform: The Backend Engine Powering Your Automation - Session 1UiPath Platform: The Backend Engine Powering Your Automation - Session 1
UiPath Platform: The Backend Engine Powering Your Automation - Session 1DianaGray10
 
UiPath Community: AI for UiPath Automation Developers
UiPath Community: AI for UiPath Automation DevelopersUiPath Community: AI for UiPath Automation Developers
UiPath Community: AI for UiPath Automation DevelopersUiPathCommunity
 
Building Your Own AI Instance (TBLC AI )
Building Your Own AI Instance (TBLC AI )Building Your Own AI Instance (TBLC AI )
Building Your Own AI Instance (TBLC AI )Brian Pichman
 
99.99% of Your Traces Are (Probably) Trash (SRECon NA 2024).pdf
99.99% of Your Traces  Are (Probably) Trash (SRECon NA 2024).pdf99.99% of Your Traces  Are (Probably) Trash (SRECon NA 2024).pdf
99.99% of Your Traces Are (Probably) Trash (SRECon NA 2024).pdfPaige Cruz
 
Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve Decarbonization
Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve DecarbonizationUsing IESVE for Loads, Sizing and Heat Pump Modeling to Achieve Decarbonization
Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve DecarbonizationIES VE
 
100+ ChatGPT Prompts for SEO Optimization
100+ ChatGPT Prompts for SEO Optimization100+ ChatGPT Prompts for SEO Optimization
100+ ChatGPT Prompts for SEO Optimizationarrow10202532yuvraj
 
OpenShift Commons Paris - Choose Your Own Observability Adventure
OpenShift Commons Paris - Choose Your Own Observability AdventureOpenShift Commons Paris - Choose Your Own Observability Adventure
OpenShift Commons Paris - Choose Your Own Observability AdventureEric D. Schabell
 
Comparing Sidecar-less Service Mesh from Cilium and Istio
Comparing Sidecar-less Service Mesh from Cilium and IstioComparing Sidecar-less Service Mesh from Cilium and Istio
Comparing Sidecar-less Service Mesh from Cilium and IstioChristian Posta
 
UiPath Studio Web workshop series - Day 8
UiPath Studio Web workshop series - Day 8UiPath Studio Web workshop series - Day 8
UiPath Studio Web workshop series - Day 8DianaGray10
 
Empowering Africa's Next Generation: The AI Leadership Blueprint
Empowering Africa's Next Generation: The AI Leadership BlueprintEmpowering Africa's Next Generation: The AI Leadership Blueprint
Empowering Africa's Next Generation: The AI Leadership BlueprintMahmoud Rabie
 
Artificial Intelligence & SEO Trends for 2024
Artificial Intelligence & SEO Trends for 2024Artificial Intelligence & SEO Trends for 2024
Artificial Intelligence & SEO Trends for 2024D Cloud Solutions
 
Meet the new FSP 3000 M-Flex800™
Meet the new FSP 3000 M-Flex800™Meet the new FSP 3000 M-Flex800™
Meet the new FSP 3000 M-Flex800™Adtran
 

Último (20)

VoIP Service and Marketing using Odoo and Asterisk PBX
VoIP Service and Marketing using Odoo and Asterisk PBXVoIP Service and Marketing using Odoo and Asterisk PBX
VoIP Service and Marketing using Odoo and Asterisk PBX
 
COMPUTER 10: Lesson 7 - File Storage and Online Collaboration
COMPUTER 10: Lesson 7 - File Storage and Online CollaborationCOMPUTER 10: Lesson 7 - File Storage and Online Collaboration
COMPUTER 10: Lesson 7 - File Storage and Online Collaboration
 
20230104 - machine vision
20230104 - machine vision20230104 - machine vision
20230104 - machine vision
 
UiPath Studio Web workshop series - Day 6
UiPath Studio Web workshop series - Day 6UiPath Studio Web workshop series - Day 6
UiPath Studio Web workshop series - Day 6
 
Computer 10: Lesson 10 - Online Crimes and Hazards
Computer 10: Lesson 10 - Online Crimes and HazardsComputer 10: Lesson 10 - Online Crimes and Hazards
Computer 10: Lesson 10 - Online Crimes and Hazards
 
Secure your environment with UiPath and CyberArk technologies - Session 1
Secure your environment with UiPath and CyberArk technologies - Session 1Secure your environment with UiPath and CyberArk technologies - Session 1
Secure your environment with UiPath and CyberArk technologies - Session 1
 
The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...
The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...
The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...
 
COMPUTER 10 Lesson 8 - Building a Website
COMPUTER 10 Lesson 8 - Building a WebsiteCOMPUTER 10 Lesson 8 - Building a Website
COMPUTER 10 Lesson 8 - Building a Website
 
UiPath Platform: The Backend Engine Powering Your Automation - Session 1
UiPath Platform: The Backend Engine Powering Your Automation - Session 1UiPath Platform: The Backend Engine Powering Your Automation - Session 1
UiPath Platform: The Backend Engine Powering Your Automation - Session 1
 
UiPath Community: AI for UiPath Automation Developers
UiPath Community: AI for UiPath Automation DevelopersUiPath Community: AI for UiPath Automation Developers
UiPath Community: AI for UiPath Automation Developers
 
Building Your Own AI Instance (TBLC AI )
Building Your Own AI Instance (TBLC AI )Building Your Own AI Instance (TBLC AI )
Building Your Own AI Instance (TBLC AI )
 
99.99% of Your Traces Are (Probably) Trash (SRECon NA 2024).pdf
99.99% of Your Traces  Are (Probably) Trash (SRECon NA 2024).pdf99.99% of Your Traces  Are (Probably) Trash (SRECon NA 2024).pdf
99.99% of Your Traces Are (Probably) Trash (SRECon NA 2024).pdf
 
Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve Decarbonization
Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve DecarbonizationUsing IESVE for Loads, Sizing and Heat Pump Modeling to Achieve Decarbonization
Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve Decarbonization
 
100+ ChatGPT Prompts for SEO Optimization
100+ ChatGPT Prompts for SEO Optimization100+ ChatGPT Prompts for SEO Optimization
100+ ChatGPT Prompts for SEO Optimization
 
OpenShift Commons Paris - Choose Your Own Observability Adventure
OpenShift Commons Paris - Choose Your Own Observability AdventureOpenShift Commons Paris - Choose Your Own Observability Adventure
OpenShift Commons Paris - Choose Your Own Observability Adventure
 
Comparing Sidecar-less Service Mesh from Cilium and Istio
Comparing Sidecar-less Service Mesh from Cilium and IstioComparing Sidecar-less Service Mesh from Cilium and Istio
Comparing Sidecar-less Service Mesh from Cilium and Istio
 
UiPath Studio Web workshop series - Day 8
UiPath Studio Web workshop series - Day 8UiPath Studio Web workshop series - Day 8
UiPath Studio Web workshop series - Day 8
 
Empowering Africa's Next Generation: The AI Leadership Blueprint
Empowering Africa's Next Generation: The AI Leadership BlueprintEmpowering Africa's Next Generation: The AI Leadership Blueprint
Empowering Africa's Next Generation: The AI Leadership Blueprint
 
Artificial Intelligence & SEO Trends for 2024
Artificial Intelligence & SEO Trends for 2024Artificial Intelligence & SEO Trends for 2024
Artificial Intelligence & SEO Trends for 2024
 
Meet the new FSP 3000 M-Flex800™
Meet the new FSP 3000 M-Flex800™Meet the new FSP 3000 M-Flex800™
Meet the new FSP 3000 M-Flex800™
 

Making Life Easier with PowerShell - SPSRIC

  • 1. MAKING LIFE EASIER WITH POWERSHELL November 5, 2011
  • 2. Special Thanks to Our Sponsors
  • 3. SharePint Everyone is invited to SharePint Immediately following SharePoint Saturday Richmond (or around 6:20 PM) Meet at aloft Richmond West 3939 Duckling Drive Glen Allen, VA 23060 (down the street from Dave & Buster’s) Then we will hop to the next location and the next within walking distance! SharePint: a gathering of SharePoint enthusiasts for fun, food, and drink.
  • 4. AGENDA • What is PowerShell • Working with PowerShell • When to Use PowerShell • Top 10 SharePoint 2010 Cmdlets • Using the PowerShell Pipeline • User Scenarios • Tools & Resources 11/7/2011 Making Life Easier with PowerShell 4
  • 5. Core Concepts WHAT IS POWERSHELL 11/7/2011 Making Life Easier with PowerShell 5
  • 6. WHAT IS POWERSHELL • Microsoft task automation framework built on the .NET framework • Command-line shell • Scripting language (*.ps1) • Common “shell” to Microsoft technologies (AD, SQL, SP, Server, etc.) • Full access to COM (Component Object Model) and WMI (Windows Management Instrumentation) for local and remote system management • Replacement to STSADM (deprecated) • PowerShell > STSADM • All STSADM operations have a PowerShell equivalent • Integrated support for multiple platforms/services (not SP specific) • Easily Extendable 11/7/2011 Making Life Easier with PowerShell 6
  • 7. Core Concepts WORKING WITH POWERSHELL 11/7/2011 Making Life Easier with PowerShell 7
  • 8. POWERSHELL SNAP-INS • PowerShell snap-in registers sets of cmdlets and/or providers, extending the default functionality of the shell • Similar to a web browser plug-in • Added and removed as needed during user session 11/7/2011 Making Life Easier with PowerShell 8
  • 9. POWERSHELL CMDLETS • A cmdlet (“command-let”) is a specific command executed in the PowerShell environment • Following a common {verb}-{noun} naming convention, cmdlet functions are typically easily understood, ie: Add-PSSnapin, Get- SPWeb, etc. • Used like a function, cmdlets take one or more input parameters/objects, and output objects or arrays of objects • Cmdlets can be piped together, allowing the output object of one to become the input object of another • Objects are always processed individually, if multiple input objects are specified, each object will be fully processed before the next is begun 11/7/2011 Making Life Easier with PowerShell 9
  • 10. WHEN TO USE POWERSHELL • Making life “easier” with PowerShell should equate to increased efficiency, lower cost, and lower turnaround • Identify those processes which are repetitive in nature or those that require extended “hands-on” time 11/7/2011 Making Life Easier with PowerShell 10
  • 11. GETTING STARTED SharePoint 2010 Management Shell PowerShell with the SharePoint Snap-in Loaded 11/7/2011 Making Life Easier with PowerShell 11
  • 12. STARTING POWERSHELL PowerShell 2.0 11/7/2011 Making Life Easier with PowerShell 12
  • 13. Demonstration CREATE A POWERSHELL PROFILE 11/7/2011 Making Life Easier with PowerShell 13
  • 14. SharePoint 2010 TOP 10 POWERSHELL CMDLETS 11/7/2011 Making Life Easier with PowerShell 14
  • 15. GET-HELP • Overview • Displays help about Windows PowerShell cmdlets and concepts • Examples • Get-Help {cmdlet} • Get-Help Test-Path • Get-Help Test-Path -Detailed • Get-Help Test-Path –Examples • Get-Help {topic} • Get-Help Snapin 11/7/2011 Making Life Easier with PowerShell 15
  • 16. GET-MEMBER • Overview • Gets the properties and methods of objects. Specify an object using the InputObject parameter, or pipe an object to Get-Member. • Examples • Get-Member –InputObject $object • $object | Get-Member 11/7/2011 Making Life Easier with PowerShell 16
  • 17. GET-SPFARM • Overview • Returns the local SharePoint farm. • Examples • Get-SPFarm • $farm = Get-SPFarm $farm.Properties 11/7/2011 Making Life Easier with PowerShell 17
  • 18. GET-SPWEBAPPLICATION • Overview • Returns all web applications that match the given criteria. If no identity is specified, all web applications are returned. The Central Administration web application is ignored unless specified directly or the IncludeCentralAdministration flag is specified. • Examples • Get-SPWebApplication • Get-SPWebApplication –IncludeCentralAdministration • Get-SPWebApplication http://intranet 11/7/2011 Making Life Easier with PowerShell 18
  • 19. GET-SPSITE • Overview • Returns all the site collections that match the given criteria. If no identity is specified, the farm is scope is used. • Examples • Get-SPSite • Get-SPSite http://intranet • Get-SPSite http://intranet/depts/facilities 11/7/2011 Making Life Easier with PowerShell 19
  • 20. GET-SPWEB • Overview • Returns all subsites that match the given criteria. • Examples • Get-SPWeb http://intranet/depts/HR/benefits • Get-SPWeb http://intranet/depts/HR/* • Get-SPWeb http://intranet/* –filter {$_.Template –eq “STS#0”} 11/7/2011 Making Life Easier with PowerShell 20
  • 21. GET-SPSERVICEAPPLICATION • Overview • Returns the specified service application. If no service application is specified, all are returned. • Examples • Get-SPServiceApplication • Get-SPServiceApplication | select Name, Status 11/7/2011 Making Life Easier with PowerShell 21
  • 22. GET-SPCONTENTDATABASE • Overview • Returns one or more content databases. • Examples • Get-SPContentDatabase • Get-SPContentDatabase –WebApplication http://intranet • Get-SPContentDatabase –Site http://intranet 11/7/2011 Making Life Easier with PowerShell 22
  • 23. TEST-SPCONTENTDATABASE • Overview • Tests a content database against a web application to verify all customizations referenced within the content database are also installed in the web application. Content databases do not need to be mounted for validation to complete. • Examples • Test-SPContentDatabase –name Lab_Content_Intranet –WebApplication http://intranet 11/7/2011 Making Life Easier with PowerShell 23
  • 24. EXPORT-CLIXML & EXPORT-CSV • Overview • Overview • Creates an XML-based • Converts objects into a representation of an series of comma- object or objects & stores separated value strings & in a file. saves file. • Examples • Examples • $sites = Get-SPSite • $sites = Get-SPSite Export-Clixml -InputObject Export-CSV -InputObject $sites -Path $sites -Path c:sites.xml c:sites.csv • Get-SPSite | Export-Clixml • Get-SPSite | Export-CSV c:sites.xml c:sites.csvs 11/7/2011 Making Life Easier with PowerShell 24
  • 25. Demonstration LIST ALL SHAREPOINT CMDLETS 11/7/2011 Making Life Easier with PowerShell 25
  • 26. POWERSHELL PIPELINE • The use of the PowerShell Pipeline allows the output object of one cmdlet to become the input object of another • “Piping” is performed by using the pipe character “ | ” between cmdlets • Applies to native cmdlets (such as sorting, logical operations, and data manipulation) and functional cmdlets (such as those for SharePoint) • Logical Example: Get-SPContentDatabase -WebApplication http://intranet | Where {$_.CurrentSiteCount -gt 5} • Functional Example: Get-SPSite http://intranet | Get-SPWeb | Enable-SPFeature -Identity “MyFeature” 11/7/2011 Making Life Easier with PowerShell 26
  • 27. Demonstration USER SCENARIOS 11/7/2011 Making Life Easier with PowerShell 27
  • 28. TOOLS & RESOURCES • Tools • Windows PowerShell Integrated Scripting Environment (ISE) • Idera PowerShell Plus (free trial available) • Resources • STSADM -> PowerShell Mapping http://technet.microsoft.com/en-us/library/ff621081.aspx • Scripting with Windows PowerShell (5 part webcast series) http://technet.microsoft.com/en-us/scriptcenter/dd742419 • PowerShell Power Hour (monthly lunchtime webcasts) http://idera.com/Education/PowerShell-Webcasts/ • Automating Microsoft SharePoint 2010 Administration with Windows PowerShell 2.0. Gary Lapointe, Shannon Bray • Automating Microsoft Windows Server 2008 R2 Administration with Windows PowerShell 2.0. Matthew Hester, Sarah Dutkiewicz 11/7/2011 Making Life Easier with PowerShell 28
  • 30. MICHAEL GREENE @webdes03 mike-greene.com

Notas del editor

  1. Test-Path $profileIf result is FALSENew-Item –type file –force $profileNotepad $profile
  2. Get-Command -PSSnapin “Microsoft.SharePoint.Powershell”
  3. Idera, $199 per user