Book Image

Microsoft SharePoint 2010 and Windows PowerShell 2.0: Expert Cookbook

By : Yaroslav Pentsarskyy
Book Image

Microsoft SharePoint 2010 and Windows PowerShell 2.0: Expert Cookbook

By: Yaroslav Pentsarskyy

Overview of this book

PowerShell is tightly integrated with SharePoint 2010, demonstrating an important alliance between the fastest growing collaboration and web publishing platform, and the latest task automation framework. The advantages of PowerShell and SharePoint integration help administrators and infrastructure specialists achieve everyday enterprise tasks more efficiently, and this book will ensure you get the most out of SharePoint configuration and management. When it comes to custom SharePoint 2010 solution configuration, creating robust PowerShell scripts is the best option for saving time and providing a point of reference as to the changes made in the server environment. This practical expert cookbook translates the most commonly found scenarios into a series of immediately usable recipes, allowing you to get up and running straight away with writing powerful PowerShell scripts for SharePoint. “Microsoft SharePoint 2010 and Windows PowerShell 2.0: Expert Cookbook” focuses on a range of distinct areas of SharePoint administration, with expert recipes targeting unique business examples.You will learn exactly how solutions were achieved for managing SharePoint list settings with PowerShell, PowerShell configuration of SharePoint FAST Search, and more. You will also learn how to tailor the recipe to your own business needs.With this advanced cookbook in hand, you will be fully equipped with the source code as a starting point for creating your scripts in order to take advantage of the integration between SharePoint and PowerShell.
Table of Contents (15 chapters)
Microsoft SharePoint 2010 and Windows PowerShell 2.0: Expert Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface

Introduction


PowerShell as a scripting language will execute actions on your target environment. Scripting is not a new concept and PowerShell is definitely not a new language. However, PowerShell and SharePoint 2010 integrate very well. This integration allows administrators and developers to access not just a limited set of commands, but also to connect to SharePoint objects and libraries to take advantage of additional capabilities of SharePoint as a platform. To ensure that we are on the same page while reading this book and trying out various recipes, we'll start by setting up your environment and verifying the setup by running a test script. After all, SharePoint relies on components, most of which we're going to be directly interacting with, and having a consistently configured environment will help in reducing any potential integration issues.

Although we can author our PowerShell scripts in Notepad and execute them in a PowerShell command-line environment, you can experience more advantages from authoring and debugging your scripts by using rich authoring environments, such as PowerGUI or PowerShell ISE. In this chapter, we'll see exactly what the benefits of using those environments are.

Whether you are creating a PowerShell script in a professional scripting environment or calling an existing script from a command line, you'll quickly notice that a default set of commands is definitely not enough to manage and work with your SharePoint system. When you have the need to author scripts accessing various other aspects of SharePoint functionality, you will need to use the additional libraries available to facilitate custom or out-of-the-box functionality required. This is a very common scenario for developers when building custom solutions for a variety of platforms. PowerShell, as a scripting language, really takes advantage of this concept allowing you to call functions from SharePoint and third-party libraries. In this chapter, we'll take a look at exactly how you can access advanced SharePoint 2010 functionality using external libraries.

As you become more familiar with authoring PowerShell scripts, you will realize that you can create a collection of reusable functionality which can be shared with others. That's when you can take advantage of sealing your custom functionality in a portable and sharable way. We'll take a look at how you can package your custom scripts as custom PowerShell CmdLets, as well as how to create a custom PowerShell Snap-In.