SlideShare una empresa de Scribd logo
1 de 15
Western Mass Microsoft User
Group--Using Powershell to
         Manage SharePoint    1/11/2012   1
   Craig Pilkenton
    o SharePoint Engineer at MassMutual
     • Enterprise User Group Lead
     • SharePoint Trainer




    o Western Mass Microsoft User Group: Co-Lead
      (http://mstech.org)
    o LinkedIn.com
      (http://www.linkedin.com/in/craigpilkenton)

                                    Western Mass Microsoft User
                                    Group--Using Powershell to
                                             Manage SharePoint    1/11/2012   2
   Overview: what is Windows Powershell
   What can('t) it do?
   Managing Server‟s
   Managing SharePoint
   Updating SharePoint
   Take-Away‟s




                         Western Mass Microsoft User
                         Group--Using Powershell to
                                  Manage SharePoint    1/11/2012   3
   What is Windows Powershell?
    o Powershell is the new extensible command-line shell we
      can run on any Windows Server or desktop that allows
      for automating administrative tasks, executing any other
      command-line toolset, or for calling any regular .NET
      class, including those for the SharePoint platform.
   What does this really mean?
    o Powershell allows for automating repetitive maintenance
      tasks, modularizing scripts to “snap-on” future
      functionality, built-in enumeration objects, and calling any
      other command-line or .NET object to get work done (e.g.
      FTP, file-shares, email, etc.). Everything that is queried or
      returned to us is an „object‟ that has all of the available
      properties and methods.
                                      Western Mass Microsoft User
                                      Group--Using Powershell to
                                               Manage SharePoint    1/11/2012   4
   What does Powershell look like?




                           Western Mass Microsoft User
                           Group--Using Powershell to
                                    Manage SharePoint    1/11/2012   5
   Demo : Usage and interaction




                         Western Mass Microsoft User
                         Group--Using Powershell to
                                  Manage SharePoint    1/11/2012   6
   Monitor server status & activate (Get-Service, Get-
    EventLog, dir/ls, Stop-Service, Restart-Service)
   Import/export files for processing or reports (Import-
    Csv, Export-Csv, Out-File, Copy-Item, FTP)
   Call other command-line utilities
    (STSADM.exe, RoboCopy, Team Foundation Server, WinZip)
   Instantiate .NET objects to use their functionality
    (Email, FileInfo, ArrayList, Hashtable)
   Instantiate SharePoint‟s .NET objects to manage the platform
    (Site-level, subweb-level, Document Library/List-
    level, permission-level)
   And just about anything else…
                                   Western Mass Microsoft User
                                   Group--Using Powershell to
                                            Manage SharePoint    1/11/2012   7
   Many out-of-the-box cmdlets
   Not just informational, but reaction-able
    o Get-Service
     Stop-Service and/or Restart-Service can be fired as
      logic determines
    o Get-EventLog
     Watch for certain events and then fire other
      cmdlets, applications, or cmdlets in response
    o dir/ls (Get-ChildItem)
     Can look for files existing and if not, take action to
      get or remove

                                 Western Mass Microsoft User
                                 Group--Using Powershell to
                                          Manage SharePoint    1/11/2012   8
   Demo : Monitoring our server, and reacting
    to it




                          Western Mass Microsoft User
                          Group--Using Powershell to
                                   Manage SharePoint    1/11/2012   9
   Everything returned is a SharePoint object
   A „Site‟ object is instantiated AND must be
    disposed of when finished
    o Load the Microsoft.SharePoint .NET 2.0 object into
      memory
    o Create a „New-Object‟ to store the SharePoint site
      inside of
    o Begin querying the new object for its
      properties, methods, and stored values; some of
      which may be other SharePoint objects and/or
      collections themselves

                               Western Mass Microsoft User
                               Group--Using Powershell to
                                        Manage SharePoint    1/11/2012   10
   Demo: Checking on our SharePoint
    environment




                        Western Mass Microsoft User
                        Group--Using Powershell to
                                 Manage SharePoint    1/11/2012   11
   We still have a handle to the SharePoint site
    object to manipulate
   So what does it take?
    o We open a new SubWeb object (but this can be done
      at any level)
    o Inside of our SubWeb object, create a new List
      object
    o On the new List object, create an instance of an
      item, add column-value pairs that match the
      SharePoint List,
    o Finally call the .Update() method to add new item

                              Western Mass Microsoft User
                              Group--Using Powershell to
                                       Manage SharePoint    1/11/2012   12
   Demo: Add a new Announcement to our
    SharePoint site




                       Western Mass Microsoft User
                       Group--Using Powershell to
                                Manage SharePoint    1/11/2012   13
   Powershell can manage any Microsoft server
    or platform (some actually have inherent
    cmdlets available e.g. Exchange
    2007, SQL, etc.)
   Not only is Microsoft moving all
    server/platforms to this model, many
    vendors are doing the same with their
    software packages and/or tools
   Powershell not only talks to almost any
    command-line interface, but allows for
    reflexive decisions based on that data
                         Western Mass Microsoft User
                         Group--Using Powershell to
                                  Manage SharePoint    1/11/2012   14
   Links
    o Windows Powershell Team
     http://blogs.msdn.com/powershell/
    o PowershellCommunity.org
     http://www.powershellcommunity.org/
    o Microsoft Online—Windows SharePoint Services
     http://office.microsoft.com/en-
      us/sharepointtechnology/FX100503841033.aspx




                              Western Mass Microsoft User
                              Group--Using Powershell to
                                       Manage SharePoint    1/11/2012   15

Más contenido relacionado

Destacado

SharePoint Performance at SPS Philly
SharePoint Performance at SPS PhillySharePoint Performance at SPS Philly
SharePoint Performance at SPS PhillySentri
 
Le filament magazine 31 de juillet et aout 2013
Le filament magazine 31 de juillet et aout 2013 Le filament magazine 31 de juillet et aout 2013
Le filament magazine 31 de juillet et aout 2013 Patrice Piardon
 
SharePoint Administration with PowerShell
SharePoint Administration with PowerShellSharePoint Administration with PowerShell
SharePoint Administration with PowerShellEric Kraus
 
SharePoint logging & debugging
SharePoint logging  & debugging SharePoint logging  & debugging
SharePoint logging & debugging Sentri
 
Sentri Webinar: Windows Azure Overview
Sentri Webinar: Windows Azure Overview Sentri Webinar: Windows Azure Overview
Sentri Webinar: Windows Azure Overview Sentri
 
SystemCenter webinar 12 6 12
SystemCenter webinar 12 6 12SystemCenter webinar 12 6 12
SystemCenter webinar 12 6 12Sentri
 
Heavy Metal PowerPivot Remastered - Experts Conference
Heavy Metal PowerPivot Remastered - Experts ConferenceHeavy Metal PowerPivot Remastered - Experts Conference
Heavy Metal PowerPivot Remastered - Experts ConferenceSentri
 

Destacado (7)

SharePoint Performance at SPS Philly
SharePoint Performance at SPS PhillySharePoint Performance at SPS Philly
SharePoint Performance at SPS Philly
 
Le filament magazine 31 de juillet et aout 2013
Le filament magazine 31 de juillet et aout 2013 Le filament magazine 31 de juillet et aout 2013
Le filament magazine 31 de juillet et aout 2013
 
SharePoint Administration with PowerShell
SharePoint Administration with PowerShellSharePoint Administration with PowerShell
SharePoint Administration with PowerShell
 
SharePoint logging & debugging
SharePoint logging  & debugging SharePoint logging  & debugging
SharePoint logging & debugging
 
Sentri Webinar: Windows Azure Overview
Sentri Webinar: Windows Azure Overview Sentri Webinar: Windows Azure Overview
Sentri Webinar: Windows Azure Overview
 
SystemCenter webinar 12 6 12
SystemCenter webinar 12 6 12SystemCenter webinar 12 6 12
SystemCenter webinar 12 6 12
 
Heavy Metal PowerPivot Remastered - Experts Conference
Heavy Metal PowerPivot Remastered - Experts ConferenceHeavy Metal PowerPivot Remastered - Experts Conference
Heavy Metal PowerPivot Remastered - Experts Conference
 

Similar a Using Powershell to manage SharePoint

Brian Jackett: Managing SharePoint 2010 Farms with Powershell
Brian Jackett: Managing SharePoint 2010 Farms with PowershellBrian Jackett: Managing SharePoint 2010 Farms with Powershell
Brian Jackett: Managing SharePoint 2010 Farms with PowershellSharePoint Saturday NY
 
Brian Jackett: Managing SharePoint 2010 Farms with Powershell
Brian Jackett: Managing SharePoint 2010 Farms with PowershellBrian Jackett: Managing SharePoint 2010 Farms with Powershell
Brian Jackett: Managing SharePoint 2010 Farms with PowershellSharePoint Saturday NY
 
Intro to SharePoint + PowerShell
Intro to SharePoint + PowerShellIntro to SharePoint + PowerShell
Intro to SharePoint + PowerShellRyan Dennis
 
Resume_Abhinav_Hadoop_Developer
Resume_Abhinav_Hadoop_DeveloperResume_Abhinav_Hadoop_Developer
Resume_Abhinav_Hadoop_DeveloperAbhinav khanduja
 
Using rest to create responsive html 5 share point intranets
Using rest to create responsive html 5 share point intranetsUsing rest to create responsive html 5 share point intranets
Using rest to create responsive html 5 share point intranetsInnoTech
 
Spsatx slides (widescreen)
Spsatx slides (widescreen)Spsatx slides (widescreen)
Spsatx slides (widescreen)Ryan Dennis
 
SharePoint 2010 - What's New?
SharePoint 2010 - What's New?SharePoint 2010 - What's New?
SharePoint 2010 - What's New?Cory Peters
 
Drupal is from Mars, Wordpress is from Venus: Finding your library's CMS soul...
Drupal is from Mars, Wordpress is from Venus: Finding your library's CMS soul...Drupal is from Mars, Wordpress is from Venus: Finding your library's CMS soul...
Drupal is from Mars, Wordpress is from Venus: Finding your library's CMS soul...sbclapp
 
2004 01 10 Chef Sa V01
2004 01 10 Chef Sa V012004 01 10 Chef Sa V01
2004 01 10 Chef Sa V01jiali zhang
 
CONTENT MANAGEMENT SYSTEM
CONTENT MANAGEMENT SYSTEMCONTENT MANAGEMENT SYSTEM
CONTENT MANAGEMENT SYSTEMANAND PRAKASH
 
Drupal 8 meets to symphony
Drupal 8 meets to symphonyDrupal 8 meets to symphony
Drupal 8 meets to symphonyBrahampal Singh
 
Things Made Easy: One Click CMS Integration with Solr & Drupal
Things Made Easy: One Click CMS Integration with Solr & DrupalThings Made Easy: One Click CMS Integration with Solr & Drupal
Things Made Easy: One Click CMS Integration with Solr & Drupallucenerevolution
 
SharePoint 2010 Tools in Visual Studio 2010
SharePoint 2010 Tools in Visual Studio 2010SharePoint 2010 Tools in Visual Studio 2010
SharePoint 2010 Tools in Visual Studio 2010Becky Bertram
 
Share point review qustions
Share point review qustionsShare point review qustions
Share point review qustionsthan sare
 
Sql And Storage Considerations For Share Point Server 2010
Sql And Storage Considerations For Share Point Server 2010Sql And Storage Considerations For Share Point Server 2010
Sql And Storage Considerations For Share Point Server 2010Mike Watson
 
Sharepoint 2010 overview - what it is and what it can do
Sharepoint 2010 overview - what it is and what it can doSharepoint 2010 overview - what it is and what it can do
Sharepoint 2010 overview - what it is and what it can doFaisal Masood
 
Introduction to using jQuery with SharePoint
Introduction to using jQuery with SharePointIntroduction to using jQuery with SharePoint
Introduction to using jQuery with SharePointRene Modery
 

Similar a Using Powershell to manage SharePoint (20)

Brian Jackett: Managing SharePoint 2010 Farms with Powershell
Brian Jackett: Managing SharePoint 2010 Farms with PowershellBrian Jackett: Managing SharePoint 2010 Farms with Powershell
Brian Jackett: Managing SharePoint 2010 Farms with Powershell
 
Brian Jackett: Managing SharePoint 2010 Farms with Powershell
Brian Jackett: Managing SharePoint 2010 Farms with PowershellBrian Jackett: Managing SharePoint 2010 Farms with Powershell
Brian Jackett: Managing SharePoint 2010 Farms with Powershell
 
Intro to SharePoint + PowerShell
Intro to SharePoint + PowerShellIntro to SharePoint + PowerShell
Intro to SharePoint + PowerShell
 
PHPExcel and OPENXML4J
PHPExcel and OPENXML4JPHPExcel and OPENXML4J
PHPExcel and OPENXML4J
 
Resume_Abhinav_Hadoop_Developer
Resume_Abhinav_Hadoop_DeveloperResume_Abhinav_Hadoop_Developer
Resume_Abhinav_Hadoop_Developer
 
Using rest to create responsive html 5 share point intranets
Using rest to create responsive html 5 share point intranetsUsing rest to create responsive html 5 share point intranets
Using rest to create responsive html 5 share point intranets
 
Spsatx slides (widescreen)
Spsatx slides (widescreen)Spsatx slides (widescreen)
Spsatx slides (widescreen)
 
Core SharePoint 2013 Concepts
Core SharePoint 2013 ConceptsCore SharePoint 2013 Concepts
Core SharePoint 2013 Concepts
 
SharePoint 2010 - What's New?
SharePoint 2010 - What's New?SharePoint 2010 - What's New?
SharePoint 2010 - What's New?
 
Drupal is from Mars, Wordpress is from Venus: Finding your library's CMS soul...
Drupal is from Mars, Wordpress is from Venus: Finding your library's CMS soul...Drupal is from Mars, Wordpress is from Venus: Finding your library's CMS soul...
Drupal is from Mars, Wordpress is from Venus: Finding your library's CMS soul...
 
2004 01 10 Chef Sa V01
2004 01 10 Chef Sa V012004 01 10 Chef Sa V01
2004 01 10 Chef Sa V01
 
CONTENT MANAGEMENT SYSTEM
CONTENT MANAGEMENT SYSTEMCONTENT MANAGEMENT SYSTEM
CONTENT MANAGEMENT SYSTEM
 
Drupal 8 meets to symphony
Drupal 8 meets to symphonyDrupal 8 meets to symphony
Drupal 8 meets to symphony
 
Things Made Easy: One Click CMS Integration with Solr & Drupal
Things Made Easy: One Click CMS Integration with Solr & DrupalThings Made Easy: One Click CMS Integration with Solr & Drupal
Things Made Easy: One Click CMS Integration with Solr & Drupal
 
SharePoint 2010 Tools in Visual Studio 2010
SharePoint 2010 Tools in Visual Studio 2010SharePoint 2010 Tools in Visual Studio 2010
SharePoint 2010 Tools in Visual Studio 2010
 
Share point review qustions
Share point review qustionsShare point review qustions
Share point review qustions
 
Sql And Storage Considerations For Share Point Server 2010
Sql And Storage Considerations For Share Point Server 2010Sql And Storage Considerations For Share Point Server 2010
Sql And Storage Considerations For Share Point Server 2010
 
Sharepoint 2010 overview - what it is and what it can do
Sharepoint 2010 overview - what it is and what it can doSharepoint 2010 overview - what it is and what it can do
Sharepoint 2010 overview - what it is and what it can do
 
Int quest
Int questInt quest
Int quest
 
Introduction to using jQuery with SharePoint
Introduction to using jQuery with SharePointIntroduction to using jQuery with SharePoint
Introduction to using jQuery with SharePoint
 

Último

Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdfChristopherTHyatt
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 

Último (20)

Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 

Using Powershell to manage SharePoint

  • 1. Western Mass Microsoft User Group--Using Powershell to Manage SharePoint 1/11/2012 1
  • 2. Craig Pilkenton o SharePoint Engineer at MassMutual • Enterprise User Group Lead • SharePoint Trainer o Western Mass Microsoft User Group: Co-Lead (http://mstech.org) o LinkedIn.com (http://www.linkedin.com/in/craigpilkenton) Western Mass Microsoft User Group--Using Powershell to Manage SharePoint 1/11/2012 2
  • 3. Overview: what is Windows Powershell  What can('t) it do?  Managing Server‟s  Managing SharePoint  Updating SharePoint  Take-Away‟s Western Mass Microsoft User Group--Using Powershell to Manage SharePoint 1/11/2012 3
  • 4. What is Windows Powershell? o Powershell is the new extensible command-line shell we can run on any Windows Server or desktop that allows for automating administrative tasks, executing any other command-line toolset, or for calling any regular .NET class, including those for the SharePoint platform.  What does this really mean? o Powershell allows for automating repetitive maintenance tasks, modularizing scripts to “snap-on” future functionality, built-in enumeration objects, and calling any other command-line or .NET object to get work done (e.g. FTP, file-shares, email, etc.). Everything that is queried or returned to us is an „object‟ that has all of the available properties and methods. Western Mass Microsoft User Group--Using Powershell to Manage SharePoint 1/11/2012 4
  • 5. What does Powershell look like? Western Mass Microsoft User Group--Using Powershell to Manage SharePoint 1/11/2012 5
  • 6. Demo : Usage and interaction Western Mass Microsoft User Group--Using Powershell to Manage SharePoint 1/11/2012 6
  • 7. Monitor server status & activate (Get-Service, Get- EventLog, dir/ls, Stop-Service, Restart-Service)  Import/export files for processing or reports (Import- Csv, Export-Csv, Out-File, Copy-Item, FTP)  Call other command-line utilities (STSADM.exe, RoboCopy, Team Foundation Server, WinZip)  Instantiate .NET objects to use their functionality (Email, FileInfo, ArrayList, Hashtable)  Instantiate SharePoint‟s .NET objects to manage the platform (Site-level, subweb-level, Document Library/List- level, permission-level)  And just about anything else… Western Mass Microsoft User Group--Using Powershell to Manage SharePoint 1/11/2012 7
  • 8. Many out-of-the-box cmdlets  Not just informational, but reaction-able o Get-Service Stop-Service and/or Restart-Service can be fired as logic determines o Get-EventLog Watch for certain events and then fire other cmdlets, applications, or cmdlets in response o dir/ls (Get-ChildItem) Can look for files existing and if not, take action to get or remove Western Mass Microsoft User Group--Using Powershell to Manage SharePoint 1/11/2012 8
  • 9. Demo : Monitoring our server, and reacting to it Western Mass Microsoft User Group--Using Powershell to Manage SharePoint 1/11/2012 9
  • 10. Everything returned is a SharePoint object  A „Site‟ object is instantiated AND must be disposed of when finished o Load the Microsoft.SharePoint .NET 2.0 object into memory o Create a „New-Object‟ to store the SharePoint site inside of o Begin querying the new object for its properties, methods, and stored values; some of which may be other SharePoint objects and/or collections themselves Western Mass Microsoft User Group--Using Powershell to Manage SharePoint 1/11/2012 10
  • 11. Demo: Checking on our SharePoint environment Western Mass Microsoft User Group--Using Powershell to Manage SharePoint 1/11/2012 11
  • 12. We still have a handle to the SharePoint site object to manipulate  So what does it take? o We open a new SubWeb object (but this can be done at any level) o Inside of our SubWeb object, create a new List object o On the new List object, create an instance of an item, add column-value pairs that match the SharePoint List, o Finally call the .Update() method to add new item Western Mass Microsoft User Group--Using Powershell to Manage SharePoint 1/11/2012 12
  • 13. Demo: Add a new Announcement to our SharePoint site Western Mass Microsoft User Group--Using Powershell to Manage SharePoint 1/11/2012 13
  • 14. Powershell can manage any Microsoft server or platform (some actually have inherent cmdlets available e.g. Exchange 2007, SQL, etc.)  Not only is Microsoft moving all server/platforms to this model, many vendors are doing the same with their software packages and/or tools  Powershell not only talks to almost any command-line interface, but allows for reflexive decisions based on that data Western Mass Microsoft User Group--Using Powershell to Manage SharePoint 1/11/2012 14
  • 15. Links o Windows Powershell Team http://blogs.msdn.com/powershell/ o PowershellCommunity.org http://www.powershellcommunity.org/ o Microsoft Online—Windows SharePoint Services http://office.microsoft.com/en- us/sharepointtechnology/FX100503841033.aspx Western Mass Microsoft User Group--Using Powershell to Manage SharePoint 1/11/2012 15