Home > Store

PowerShell for SharePoint 2010 How-To

Register your product to gain access to bonus material or receive a coupon.

PowerShell for SharePoint 2010 How-To

Book

  • Sorry, this book is no longer in print.
Not for Sale

Description

  • Copyright 2011
  • Dimensions: 6" x 9"
  • Edition: 1st
  • Book
  • ISBN-10: 0-672-33559-X
  • ISBN-13: 978-0-672-33559-4

Need fast, reliable, easy-to-implement solutions for automating SharePoint 2010 administration with PowerShell? This book delivers exactly what you’re looking for: step-by-step help and guidance with the tasks you’ll perform most often. You’ll find tested PowerShell scripts and proven techniques for managing installations, servers, farms, IIS, users, services, sites, data, solutions, enterprise services, and more. You’ll even find practical guidance and tested solutions for getting more value from Enterprise Search and PerformancePoint business intelligence. The industry’s most focused resource for scripting SharePoint with PowerShell, this book provides all the answers you need–now!

Fast, Accurate, and Easy-to-Use!

  • Run PowerShell scripts from the SharePoint 2010 Management Shell console
  • Perform unattended SharePoint installations
  • Configure new farms, add servers, and manage sites
  • Create new site collections and sub-sites
  • Review and set Farm Configuration Values and SharePoint Designer Settings
  • Display, get, create, remove, configure, and extend web applications
  • Create, manage, remove, back up, and restore SharePoint databases
  • Work with SharePoint solutions and features
  • Automatically publish and manage content
  • Control Office features: Excel Services, Access Services, Visio Graphic Services, Word Services, and PerformancePoint Services
  • Administer InfoPath Form Services, profiles, metadata, Secure Store, and other service applications
  • Change the behavior of Enterprise Search and SharePoint Foundation Search
  • Manage external data connections via Business Data Connectivity Service

Sample Content

Online Sample Chapter

SharePoint Installation and Configuration

Sample Pages

Download the sample pages (includes Chapter 3 and Index)

Table of Contents

Introduction    1

Part I:  Getting Started

1  SharePoint 2010 Management Shell    5

How Do I Run PowerShell?    6

How Do I Make PowerShell Aware of SharePoint?    6

What Is the SharePoint 2010 Management Shell?    7

What Is the SharePoint 2010 Management Shell Loading?    8

2  PowerShell Basics    11

What Is a Cmdlet?    12

How Can I See the Possible Verbs for a Noun Command?    12

What Is a Parameter?    12

What Is a Switch Parameter?    12

How Can I See the Possible Parameters for a Cmdlet?    12

What Does F3 Do?    13

What Does F7 Do?    13

What Are Console Commands?    14

Path Environment Variable    14

Run Unsigned Scripts    15

Disable the Confirmation Prompt    15

Generate Inline Credentials    16

Reference an Assembly    17

Part II:  Server Management

3  SharePoint Installation and Configuration    21

Prepare the Microsoft SharePoint Installation Module    22

Install SharePoint Unattended    23

Installing Without a Product Key in the Configuration File    24

Configure a New SharePoint Farm    24

Join a Server to the SharePoint Farm    26

Create a New Web Application    26

Create a New Site Collection    27

Create a New Subsite    28

4  Farm Management    31

Review Farm Configuration Values    32

Set the Farm Configuration Values    32

Refresh Installed Products    34

Change the Port of Central Admin    34

Change the Farm Passphrase    34

Retrieve the System Accounts    35

Retrieve Managed Accounts    36

Rename a Site Template    36

Rename a Server on the Farm    37

Display the Configured Managed Paths    37

Create a New Managed Path    38

Remove a Managed Path    39

Merge Log Files    39

End the Current Log File    40

Review SharePoint Designer Settings    41

Configure SharePoint Designer Settings    41

Review Workflow Configuration Settings    42

Modify Workflow Configuration Settings    43

Display Available Timer Jobs on the Farm    44

Get a Specific Timer Job    45

Enable a Timer Job    46

Disable a Timer Job    46

Start a Timer Job    46

Set the Schedule for a Timer Job    47

5  Web Application Management    49

Display Available Web Applications on the Farm    50

Get a Specific Web Application    50

Remove a Web Application    51

Create a New Web Application    51

Configure Web Application Settings    52

Extend a Web Application    53

Create an Alternate Access Mapping URL    54

Display All Alternate Access Mappings    55

Get a Specific Alternate URL Entry    55

Change the Zone of an Alternate Access Mapping    56

Remove an Alternate Access Mapping    56

6  Service Application Management    59

Install Service Applications    60

Display Available Service Applications on the Farm    60

Get a Specific Service Application    61

Configure IIS Settings for a Service Application    61

Share a Service Application    62

Remove a Service Application    63

Display Service Instances on a Server    64

Get a Specific Service Instance    65

Start a Service Instance    65

Stop a Service Instance    66

Ancillary Cmdlets for Service Applications    66

7  SharePoint Database Management    67

Display All SharePoint Databases    68

Get a Specific Database    69

Create a New Content Database    69

Display All Content Databases for a Web Application    70

Detach a Content Database from a Web Application    71

Attach a Content Database to a Web Application    72

Delete a Content Database    72

Create a New Configuration Database    73

Delete a Configuration Database    73

Back Up a Configuration Database    74

Restore a Configuration Database    75

Back Up the SharePoint Farm    75

Restore the SharePoint Farm    76

Back Up a Site Collection    76

Restore a Site Collection    77

Part III:  Development and Administration

8  Site Management    81

Display All Available Site Collections on the Farm    82

Display Available Site Collections in a Web Application    82

Display Available Site Collections in a Content Database    83

Get a Specific Site Collection    83

Remove a Site Collection    84

Create a Site Collection    84

Set the Lock State of a Site Collection    85

Set the Storage Limits on a Site Collection    86

Create a Site Under a Site Collection    87

Display All Subsites within a Site Collection    87

Get a Specific Subsite (Web)    88

Remove a Subsite (Web) from a Site Collection    88

Modify the Subsite (Web) URL    89

Move a Site Collection to a Different Content Database    89

Move All Site Collections from One Content Database to Another    90

9  Solutions and Features    91

Add a Solution to the SharePoint Farm    92

Display Available Solutions on the Farm    92

Get a Specific Solution    93

Deploy a Solution to a Web Application    93

Retract a Solution    94

Upgrade a Deployed Solution    95

Remove a Solution from the SharePoint Farm    96

Add a Sandboxed Solution to a Site Collection    96

Display Available Sandboxed Solutions in a Site Collection    97

Get a Specific Sandboxed Solution    97

Activate a Sandboxed Solution    98

Deactivate a Sandboxed Solution    98

Upgrade a Deployed Sandboxed Solution    99

Remove a Sandboxed Solution from a Site Collection    99

Display Available Features    100

Get a Specific Feature    101

Activate a Feature    101

Deactivate a Feature    102

Install a Feature in SharePoint    103

Uninstall a Feature from SharePoint    103

Export Installed Farm Solutions    104

10  Content Deployment    105

Create a New Deployment Path    106

Display Deployment Paths Configured on the Farm    106

Get a Specific Content Deployment Path    107

Remove a Content Deployment Path    107

Create a New Deployment Job    108

Display Deployment Jobs Configured on the Farm    108

Get a Specific Content Deployment Job    109

Remove a Content Deployment Job    109

Start a Content Deployment Job    109

Modify Content Deployment Configurations    110

Part IV:  Service Application Management

11  InfoPath Forms Services    113

Browser-Enable Form Templates    114

Throttle Data Connection Timeouts    114

Throttle the Data Connection Response Size    115

Modify Authentication Settings    115

Configure Session State    116

Enable View State    117

Verify and Upload a Form Template    118

Upload Multiple Form Templates at Once    118

Activate or Deactivate a Form to or from a Site Collection    119

Remove a Form from InfoPath Form Services    119

Quiesce a Form from InfoPath Form Services    120

Enable the Web Service Proxy    120

12  Enterprise Search    123

Display the Enterprise Search Service Information    124

Display Enterprise Search Service Instances    124

Get a Specific Enterprise Search Service Instance    125

Configure the Crawl Account for Enterprise Search    126

Configure the Enterprise Search Service Performance Level    126

Display Enterprise Search Service Applications    127

Get a Specific Enterprise Search Service Application    128

Create a Custom Metadata Category    128

Display Available Metadata Categories    129

Get a Specific Metadata Category    129

Create a Custom Metadata Crawled Property    130

Display Available Crawled Properties    131

Get a Specific Metadata Crawled Property    132

Create a Custom Metadata Managed Property    133

Display Available Managed Properties    133

Get a Specific Metadata Managed Property    134

Create a Metadata Mapping    135

13  SharePoint Foundation Search    137

Display the Search Service Information    138

Display Search Service Instances    138

Get a Specific Search Service Instance    139

Configure the Crawl Account    139

Configure the Maximum Backup Duration    141

Configure the Search Service Performance Level    141

14  Profile Service    143

Get the Identity of the Profile Service Application    144

Get a Specific Profile Service Application Instance    144

Configure Settings on the User Profile Service Application    145

Remove Old Comments    145

Remove Old Ratings    146

Remove Old Tags    146

Update the Profile Photo Store    147

Use Ancillary Cmdlets for the User Profile Service    147

15  Business Data Connectivity Service    149

Get the Identity of the BCS Service Application    150

Get a Specific BCS Service Application Instance    150

Configure the BCS Database    151

Get a BCS Metadata Object    151

Import a BCS Model    152

Export a BCS Model    153

16  Secure Store Service    155

Get the Identity of the Secure Store Service Application    156

Get a Specific Secure Store Service Application Instance    156

Enable Auditing for the Secure Store Service    157

Configure the Secure Store Database    157

Generate a New Master Key    158

Refresh the Encryption Key    159

Create Application Fields    159

Create a Target Application    161

Create a New Application Entry    161

17  Metadata Service    163

Get the Identity of the Metadata Service Application    164

Get a Specific Metadata Service Application Instance    164

Configure the Metadata Service Accounts    165

Configure the Term Store Database    165

Configure the Content Type Hub    166

Get the Identity of the Metadata Service Proxy    166

Get a Specific Metadata Service Application Proxy Instance    167

Configure the Metadata Service Connection Options    168

18  Session State and State Services    171

Enable Session State    172

Disable Session State    172

Display Session State Information    173

Configure the Timeout of the Session State    174

Display State Service Applications Configured on the Farm    175

Get a Specific State Service Application    175

Rename a State Service Application    176

Perform a State Service Database Operation    176

Part V:  Office Features

19  Excel Services    181

Create a Trusted File Location    182

Display All Trusted File Locations    183

Get a Specific Trusted File Location    183

Remove a Trusted File Location    184

Create a Trusted Data Connection Library    185

Display All Trusted Data Connection Libraries    185

Get a Specific Trusted Data Connection Library    186

Remove a Trusted Data Connection Library    186

Create a New Safe Data Provider    187

Display All Safe Data Providers    188

Get a Specific Safe Data Provider    188

Remove a Safe Data Provider    189

Create a Blocked File Type    190

Display All Blocked File Types    190

Get a Specific Blocked File Type    191

Remove a Blocked File Type    191

Create a User-Defined Function Reference    192

Display All User-Defined Function References    192

Get a Specific User-Defined Function Reference    193

Remove a User-Defined Function Reference    193

Modify Excel Services Objects    194

20  PerformancePoint Services    195

Configure the Unattended Service Account    196

Display the Unattended Service Account    196

Create a Trusted Content Location    197

Create a Trusted Data Source Location    198

Display All Trusted Content Locations    198

Display All Trusted Data Source Locations    199

Display Details of Trusted Locations    199

Get a Specific Trusted Location    200

Remove a Trusted Location    200

Configure PerformancePoint Services to Enforce Trusted Locations    201

Configure PerformancePoint Services Application Settings    202

21  Access Services    203

Configure the Application Log Size    204

Configure the Cache Timeout    204

Modify the Maximum Columns in a Query    205

Modify the Maximum Calculated Columns in a Query    205

Configure the Maximum Order By Clauses    206

Configure the Maximum Number of Rows in a Query    206

Configure the Maximum Number of Records in an Access Table    207

Configure the Maximum Number of Sources in a Query    208

Enable and Disable the Use of Outer Joins    208

Allow or Restrict Non-Remotable Queries    209

Throttle Access Services Memory Utilization    210

Throttle Session Memory Utilization    210

Configure User Sessions    211

Limit Template Sizes    212

22  Visio Graphics Services    213

Configure the Unattended Service Account    214

Create a New Safe Data Provider    214

Display All Safe Data Providers    216

Get a Specific Safe Data Provider    216

Remove a Safe Data Provider    217

Set the Description of a Data Provider    217

Configure Visio Performance Settings    218

23  Word Services    219

Configure the Conversion Processes    220

Configure Conversion Throughput    220

Configure Supported Document Formats for Conversion    222

Modify Database Information    223

Modify Job Monitoring    224

Modify Conversion Timeouts    225

Modify the Maximum Conversion Attempts    225

Modify the Maximum Memory Usage    226

Disable Word 97–2003 Document Scanning    226

Disable Embedded Fonts in Conversions    227

Modify the Recycle Threshold    228

Part V:  Appendices

A  stsadm vs     SharePoint PowerShell    231

B  Upgrade/Migration    237

Index    239

Updates

Submit Errata

More Information

InformIT Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from InformIT and its family of brands. I can unsubscribe at any time.

Overview


Pearson Education, Inc., 221 River Street, Hoboken, New Jersey 07030, (Pearson) presents this site to provide information about products and services that can be purchased through this site.

This privacy notice provides an overview of our commitment to privacy and describes how we collect, protect, use and share personal information collected through this site. Please note that other Pearson websites and online products and services have their own separate privacy policies.

Collection and Use of Information


To conduct business and deliver products and services, Pearson collects and uses personal information in several ways in connection with this site, including:

Questions and Inquiries

For inquiries and questions, we collect the inquiry or question, together with name, contact details (email address, phone number and mailing address) and any other additional information voluntarily submitted to us through a Contact Us form or an email. We use this information to address the inquiry and respond to the question.

Online Store

For orders and purchases placed through our online store on this site, we collect order details, name, institution name and address (if applicable), email address, phone number, shipping and billing addresses, credit/debit card information, shipping options and any instructions. We use this information to complete transactions, fulfill orders, communicate with individuals placing orders or visiting the online store, and for related purposes.

Surveys

Pearson may offer opportunities to provide feedback or participate in surveys, including surveys evaluating Pearson products, services or sites. Participation is voluntary. Pearson collects information requested in the survey questions and uses the information to evaluate, support, maintain and improve products, services or sites, develop new products and services, conduct educational research and for other purposes specified in the survey.

Contests and Drawings

Occasionally, we may sponsor a contest or drawing. Participation is optional. Pearson collects name, contact information and other information specified on the entry form for the contest or drawing to conduct the contest or drawing. Pearson may collect additional personal information from the winners of a contest or drawing in order to award the prize and for tax reporting purposes, as required by law.

Newsletters

If you have elected to receive email newsletters or promotional mailings and special offers but want to unsubscribe, simply email information@informit.com.

Service Announcements

On rare occasions it is necessary to send out a strictly service related announcement. For instance, if our service is temporarily suspended for maintenance we might send users an email. Generally, users may not opt-out of these communications, though they can deactivate their account information. However, these communications are not promotional in nature.

Customer Service

We communicate with users on a regular basis to provide requested services and in regard to issues relating to their account we reply via email or phone in accordance with the users' wishes when a user submits their information through our Contact Us form.

Other Collection and Use of Information


Application and System Logs

Pearson automatically collects log data to help ensure the delivery, availability and security of this site. Log data may include technical information about how a user or visitor connected to this site, such as browser type, type of computer/device, operating system, internet service provider and IP address. We use this information for support purposes and to monitor the health of the site, identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents and appropriately scale computing resources.

Web Analytics

Pearson may use third party web trend analytical services, including Google Analytics, to collect visitor information, such as IP addresses, browser types, referring pages, pages visited and time spent on a particular site. While these analytical services collect and report information on an anonymous basis, they may use cookies to gather web trend information. The information gathered may enable Pearson (but not the third party web trend services) to link information with application and system log data. Pearson uses this information for system administration and to identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents, appropriately scale computing resources and otherwise support and deliver this site and its services.

Cookies and Related Technologies

This site uses cookies and similar technologies to personalize content, measure traffic patterns, control security, track use and access of information on this site, and provide interest-based messages and advertising. Users can manage and block the use of cookies through their browser. Disabling or blocking certain cookies may limit the functionality of this site.

Do Not Track

This site currently does not respond to Do Not Track signals.

Security


Pearson uses appropriate physical, administrative and technical security measures to protect personal information from unauthorized access, use and disclosure.

Children


This site is not directed to children under the age of 13.

Marketing


Pearson may send or direct marketing communications to users, provided that

  • Pearson will not use personal information collected or processed as a K-12 school service provider for the purpose of directed or targeted advertising.
  • Such marketing is consistent with applicable law and Pearson's legal obligations.
  • Pearson will not knowingly direct or send marketing communications to an individual who has expressed a preference not to receive marketing.
  • Where required by applicable law, express or implied consent to marketing exists and has not been withdrawn.

Pearson may provide personal information to a third party service provider on a restricted basis to provide marketing solely on behalf of Pearson or an affiliate or customer for whom Pearson is a service provider. Marketing preferences may be changed at any time.

Correcting/Updating Personal Information


If a user's personally identifiable information changes (such as your postal address or email address), we provide a way to correct or update that user's personal data provided to us. This can be done on the Account page. If a user no longer desires our service and desires to delete his or her account, please contact us at customer-service@informit.com and we will process the deletion of a user's account.

Choice/Opt-out


Users can always make an informed choice as to whether they should proceed with certain services offered by InformIT. If you choose to remove yourself from our mailing list(s) simply visit the following page and uncheck any communication you no longer want to receive: www.informit.com/u.aspx.

Sale of Personal Information


Pearson does not rent or sell personal information in exchange for any payment of money.

While Pearson does not sell personal information, as defined in Nevada law, Nevada residents may email a request for no sale of their personal information to NevadaDesignatedRequest@pearson.com.

Supplemental Privacy Statement for California Residents


California residents should read our Supplemental privacy statement for California residents in conjunction with this Privacy Notice. The Supplemental privacy statement for California residents explains Pearson's commitment to comply with California law and applies to personal information of California residents collected in connection with this site and the Services.

Sharing and Disclosure


Pearson may disclose personal information, as follows:

  • As required by law.
  • With the consent of the individual (or their parent, if the individual is a minor)
  • In response to a subpoena, court order or legal process, to the extent permitted or required by law
  • To protect the security and safety of individuals, data, assets and systems, consistent with applicable law
  • In connection the sale, joint venture or other transfer of some or all of its company or assets, subject to the provisions of this Privacy Notice
  • To investigate or address actual or suspected fraud or other illegal activities
  • To exercise its legal rights, including enforcement of the Terms of Use for this site or another contract
  • To affiliated Pearson companies and other companies and organizations who perform work for Pearson and are obligated to protect the privacy of personal information consistent with this Privacy Notice
  • To a school, organization, company or government agency, where Pearson collects or processes the personal information in a school setting or on behalf of such organization, company or government agency.

Links


This web site contains links to other sites. Please be aware that we are not responsible for the privacy practices of such other sites. We encourage our users to be aware when they leave our site and to read the privacy statements of each and every web site that collects Personal Information. This privacy statement applies solely to information collected by this web site.

Requests and Contact


Please contact us about this Privacy Notice or if you have any requests or questions relating to the privacy of your personal information.

Changes to this Privacy Notice


We may revise this Privacy Notice through an updated posting. We will identify the effective date of the revision in the posting. Often, updates are made to provide greater clarity or to comply with changes in regulatory requirements. If the updates involve material changes to the collection, protection, use or disclosure of Personal Information, Pearson will provide notice of the change through a conspicuous notice on this site or other appropriate way. Continued use of the site after the effective date of a posted revision evidences acceptance. Please contact us if you have questions or concerns about the Privacy Notice or any objection to any revisions.

Last Update: November 17, 2020