SlideShare ist ein Scribd-Unternehmen logo
1 von 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

Weitere ähnliche Inhalte

Was ist angesagt?

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
 

Was ist angesagt? (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
 

Andere mochten auch

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
 

Andere mochten auch (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
 

Ähnlich wie 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
 

Ähnlich wie 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!
 

Kürzlich hochgeladen

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
 
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
 
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
 
Salesforce Miami User Group Event - 1st Quarter 2024
Salesforce Miami User Group Event - 1st Quarter 2024Salesforce Miami User Group Event - 1st Quarter 2024
Salesforce Miami User Group Event - 1st Quarter 2024SkyPlanner
 
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
 
IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019
IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019
IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019IES VE
 
Introduction to Matsuo Laboratory (ENG).pptx
Introduction to Matsuo Laboratory (ENG).pptxIntroduction to Matsuo Laboratory (ENG).pptx
Introduction to Matsuo Laboratory (ENG).pptxMatsuo Lab
 
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCost
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCostKubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCost
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCostMatt Ray
 
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
 
activity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdf
activity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdf
activity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdfJamie (Taka) Wang
 
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
 
20230202 - Introduction to tis-py
20230202 - Introduction to tis-py20230202 - Introduction to tis-py
20230202 - Introduction to tis-pyJamie (Taka) Wang
 
Nanopower In Semiconductor Industry.pdf
Nanopower  In Semiconductor Industry.pdfNanopower  In Semiconductor Industry.pdf
Nanopower In Semiconductor Industry.pdfPedro Manuel
 
Designing A Time bound resource download URL
Designing A Time bound resource download URLDesigning A Time bound resource download URL
Designing A Time bound resource download URLRuncy Oommen
 
Igniting Next Level Productivity with AI-Infused Data Integration Workflows
Igniting Next Level Productivity with AI-Infused Data Integration WorkflowsIgniting Next Level Productivity with AI-Infused Data Integration Workflows
Igniting Next Level Productivity with AI-Infused Data Integration WorkflowsSafe Software
 
Cybersecurity Workshop #1.pptx
Cybersecurity Workshop #1.pptxCybersecurity Workshop #1.pptx
Cybersecurity Workshop #1.pptxGDSC PJATK
 
Machine Learning Model Validation (Aijun Zhang 2024).pdf
Machine Learning Model Validation (Aijun Zhang 2024).pdfMachine Learning Model Validation (Aijun Zhang 2024).pdf
Machine Learning Model Validation (Aijun Zhang 2024).pdfAijun Zhang
 
9 Steps For Building Winning Founding Team
9 Steps For Building Winning Founding Team9 Steps For Building Winning Founding Team
9 Steps For Building Winning Founding TeamAdam Moalla
 

Kürzlich hochgeladen (20)

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
 
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
 
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
 
Salesforce Miami User Group Event - 1st Quarter 2024
Salesforce Miami User Group Event - 1st Quarter 2024Salesforce Miami User Group Event - 1st Quarter 2024
Salesforce Miami User Group Event - 1st Quarter 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™
 
IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019
IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019
IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019
 
Introduction to Matsuo Laboratory (ENG).pptx
Introduction to Matsuo Laboratory (ENG).pptxIntroduction to Matsuo Laboratory (ENG).pptx
Introduction to Matsuo Laboratory (ENG).pptx
 
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCost
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCostKubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCost
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCost
 
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 )
 
activity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdf
activity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdf
activity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdf
 
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
 
20230202 - Introduction to tis-py
20230202 - Introduction to tis-py20230202 - Introduction to tis-py
20230202 - Introduction to tis-py
 
Nanopower In Semiconductor Industry.pdf
Nanopower  In Semiconductor Industry.pdfNanopower  In Semiconductor Industry.pdf
Nanopower In Semiconductor Industry.pdf
 
201610817 - edge part1
201610817 - edge part1201610817 - edge part1
201610817 - edge part1
 
Designing A Time bound resource download URL
Designing A Time bound resource download URLDesigning A Time bound resource download URL
Designing A Time bound resource download URL
 
Igniting Next Level Productivity with AI-Infused Data Integration Workflows
Igniting Next Level Productivity with AI-Infused Data Integration WorkflowsIgniting Next Level Productivity with AI-Infused Data Integration Workflows
Igniting Next Level Productivity with AI-Infused Data Integration Workflows
 
Cybersecurity Workshop #1.pptx
Cybersecurity Workshop #1.pptxCybersecurity Workshop #1.pptx
Cybersecurity Workshop #1.pptx
 
Machine Learning Model Validation (Aijun Zhang 2024).pdf
Machine Learning Model Validation (Aijun Zhang 2024).pdfMachine Learning Model Validation (Aijun Zhang 2024).pdf
Machine Learning Model Validation (Aijun Zhang 2024).pdf
 
20230104 - machine vision
20230104 - machine vision20230104 - machine vision
20230104 - machine vision
 
9 Steps For Building Winning Founding Team
9 Steps For Building Winning Founding Team9 Steps For Building Winning Founding Team
9 Steps For Building Winning Founding Team
 

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

Hinweis der Redaktion

  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