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

Preface

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 to when changes are 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.

What this book covers

Chapter 1, PowerShell Scripting Methods and Creating Custom Commands: Go further with PowerShell to create your own PowerShell commands (CmdLets) and snap-ins and share them with your team.

Chapter 2, Enterprise Content Deployment and Provisioning using PowerShell: Automate your SharePoint 2010 custom solution deployment by using a robust PowerShell script.

Chapter 3, Performing Advanced List and Content Operations in SharePoint using PowerShell: Master the management of SharePoint lists and list settings with PowerShell.

Chapter 4, Managing External Data in SharePoint and Business Connectivity Services using PowerShell: Get to the bottom of administering Business Connectivity Services (BCS) in SharePoint.

Chapter 5, Managing SharePoint 2010 Metadata and Social Features using PowerShell: Learn all about performing the most common configurations around SharePoint taxonomy features and user profile services.

Chapter 6, Managing SharePoint Search and FAST Search with PowerShell: Configure SharePoint FAST Search using PowerShell including audience targeting and improving search results.

Chapter 7, Managing SharePoint Site Content in Bulk using PowerShell: Configure content on SharePoint pages including bulk provisioning and configuration publishing pages, content types and web parts.

Chapter 8, Managing Documents and Records in SharePoint with PowerShell: Get the most out of document and records management in SharePoint 2010 by automating configuration.

Chapter 9, Administrating Web Application and Server Administration in SharePoint with PowerShell: Simplify SharePoint server management by using PowerShell for tasks like web application settings, configuration and monitoring, sandbox features, and more.

What you need for this book

To complete the tasks in this book, you will need a system with SharePoint 2010 Server Standard installed. Some areas of the book will require FAST Search to be installed and configured. We recommend downloading and installing 2010 Information Worker Demonstration and Evaluation Virtual Machine (RTM) Virtual Machine environment if you do not have a compatible system set up. The most current link to download the virtual environment can be retrieved by searching for the 2010 Information Worker Demonstration and Evaluation Virtual Machine (RTM). By downloading the preceding environment, you will ensure all of the configurations and setups have been performed and your system is ready for using PowerShell with SharePoint.

Who this book is for

If you are a SharePoint administrator or IT Pro who wants to extend your knowledge of PowerShell automation, this book is a must have. You should have a solid grasp of working with SharePoint and PowerShell.

Conventions

In this book, you will find a number of styles of text that distinguish between different kinds of information. Here are some examples of these styles, and an explanation of their meaning.

Code words in text are shown as follows: " Set the filename of the script to ManageSandbox.ps1."

A block of code is set as follows:

$QuotaTemplate.UserCodeMaximumLevel = 200
$QuotaTemplate.UserCodeWarningLevel = 100
$AdminService.Update()

When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:

$SPSite.WebApplication.Update()
Write-Host "Web application configuration complete"
}
$SPSite.Dispose()Any command-line input or output is written as follows:
PS C:\Users\Administrator\Desktop> .\ WebApplicationThrottling.ps1

New terms and important words are shown in bold. Words that you see on the screen, in menus or dialog boxes for example, appear in the text like this: "Click File | Save to save the script to your development machine's desktop."

Note

Warnings or important notes appear in a box like this.

Note

Tips and tricks appear like this.

Reader feedback

Feedback from our readers is always welcome. Let us know what you think about this book—what you liked or may have disliked. Reader feedback is important for us to develop titles that you really get the most out of.

To send us general feedback, simply send an e-mail to, and mention the book title via the subject of your message.

If there is a book that you need and would like to see us publish, please send us a note in the SUGGEST A TITLE form on www.packtpub.com or e-mail.

If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide on www.packtpub.com/authors.

Customer support

Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.

You can download the example code files for all Packt books you have purchased from your account at http://www.PacktPub.com. If you purchased this book elsewhere, you can visit http://www.PacktPub.com/support and register to have the files e-mailed directly to you.

Errata

Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books—maybe a mistake in the text or the code—we would be grateful if you would report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting http://www.packtpub.com/support, selecting your book, clicking on the errata submission form link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded on our website, or added to any list of existing errata, under the Errata section of that title. Any existing errata can be viewed by selecting your title from http://www.packtpub.com/support.

Piracy

Piracy of copyright material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works, in any form, on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy.

Please contact us at with a link to the suspected pirated material.

We appreciate your help in protecting our authors, and our ability to bring you valuable content.

Questions

You can contact us at if you are having a problem with any aspect of the book, and we will do our best to address it.