Friday, May 18, 2012

SharePoint 2010 Ignite Virtual Training - Day 2: Windows PowerShell

Posted in [SharePoint], [Technical] By Janice Fiorillo @ 2/16/2010 9:05 PM

 

During today’s SharePoint 2010 Ignite training, it was apparent that Microsoft is now turning to Windows PowerShell as the primary command line tool for interaction with SharePoint. 

I learned about many of the advantages that are obtained by utilizing the SharePoint 2010 Management Shell to script administrative tasks in SharePoint Server 2010. Windows PowerShell cmdlets go far beyond the capabilities of previous command-line tools such as STSADM.  Windows PowerShell is not a replacement for STSADM, but it certainly seems to be more flexible and powerful.

The Hands-On labs gave me a test drive into the following areas:

  • How to use Windows PowerShell scripting techniques, such as pipes, filters, wildcards, and enumerations, for SharePoint Server 2010 administration.

  • How to assign variables and use the SharePoint object model from Windows PowerShell.

The ability to use wildcards can be particularly useful when you combine cmdlets.  For example, suppose you want to provision a team blog site on every site collection on the http://abc.domain.com/sites/ managed path.  First you would enumerate through each site collection on the path and then create the new blog site under each one.

 The PowerShell code would look as follows:

 PS C:\Users\Administrator> Get-SPSite http://abc.domain.com/sites/* -Limit All | foreach{New-SPWeb –Url ($_.Url + "/blog") –Template BLOG#0} 

 And now it's done!  The “power” of Windows PowerShell is really starting to sink in.

Popular tags: , , , ,

Comments

Got something to say? Join the discussion »

leave a reply

 [Quick Submit with Ctrl+Enter]

Remember my details
Notify me of followup comments via e-mail

C5_Insight

About C5 Insight

We are a Microsoft Gold Certified partner focusing on SharePoint, Microsoft Dynamics CRM and Salesforce.com.  Learn more about us by visiting our website.

Search

We Wrote the Bible on Microsoft SharePoint and Dynamics CRMBook-Microsoft Dynamics CRM 2011 and SharePoint 2010 Bible

Tags

Maximize

Recent Comments

Maximize

Blog Roll

Maximize

Disclaimer

The information herein may be used solely at your own risk.  No warranty is made by the author or by C5 Insight, Inc.

The opinons expressed herein are those of the individual authors and do not necessarily represent C5 Insight, Inc in any way.

Copyright 2011 by C5 Insight