Microsoft SharePoint 2010 and Windows PowerShell 2.0: Expert Cookbook
上QQ阅读APP看书,第一时间看更新

Introduction

As we've seen in Chapter 1, PowerShell Scripting Methods and Creating Custom Commands, the strength of PowerShell lies in its ability to access and manipulate complex objects in SharePoint. In this chapter, we'll take a look at many more PowerShell capabilities and usage scenarios targeting enterprise content provisioning and deployment.

When setting up a new solution in your environment, you are likely to want to set it up on a test environment before rolling it out to production. In more complex scenarios, customers require the same solution to be deployed to testing, quality assurance, staging, and production environments. If your solution requires site hierarchy to be provisioned to many environments on the target system, it might be a very time consuming and error-prone task. In this chapter, we'll take a look at how you can create a reusable deployment script with PowerShell to automate your site hierarchy provisioning and solution deployment.

As your SharePoint environment is set up and used in production, periodically you will need to upgrade or install additional functionality. In this chapter, we'll cover how you can activate a set of features across multiple site collections allowing you to streamline your upgrade and solution maintenance process.

Quite often, an out-of-the-box site template is all you need for your SharePoint sites. Over time, your users request additional functionality which they would like to see in subsequent instances of their SharePoint sites. We'll take a look at exactly what's involved in automatically triggering customizations on your custom and out-of-the-box site templates. We'll also look at how you can leverage PowerShell to limit the availability of templates on your SharePoint site.

Many corporate intranets make use of workflows to manage business processes on the site. Whether you are using SharePoint or custom workflows on the site now, or planning to use it in the future, we'll see how you can associate existing workflow templates to lists and libraries within your site.

Finally, we'll see how you can automate managing the look and feel of the site using a PowerShell script.