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

Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
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
 
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
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
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
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
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
 
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
 
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
 
"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
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
"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
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
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
 
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
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfSeasiaInfotech2
 

Último (20)

Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
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
 
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)
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
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
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
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
 
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
 
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
 
"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
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
"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
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
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
 
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!
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdf
 

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