0% found this document useful (0 votes)
85 views

Powers Hell

This document discusses the benefits of learning PowerShell for SharePoint administrators and developers. PowerShell allows automation of administrative tasks and has significant performance benefits over traditional STSADM commands. A PowerShell script is provided that can enable a feature on every site much faster than the equivalent STSADM command, completing a task that would take 12+ hours in just 30 minutes. Administrators are encouraged to learn PowerShell to take advantage of its 652 commands for managing SharePoint 2010 versus the 182 STSADM commands in SharePoint 2007.

Uploaded by

Sreedhar Konduru
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
85 views

Powers Hell

This document discusses the benefits of learning PowerShell for SharePoint administrators and developers. PowerShell allows automation of administrative tasks and has significant performance benefits over traditional STSADM commands. A PowerShell script is provided that can enable a feature on every site much faster than the equivalent STSADM command, completing a task that would take 12+ hours in just 30 minutes. Administrators are encouraged to learn PowerShell to take advantage of its 652 commands for managing SharePoint 2010 versus the 182 STSADM commands in SharePoint 2007.

Uploaded by

Sreedhar Konduru
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

POWERSHELL

If you are a SharePoint developer or administrator, then start learning Power Shell. Its a must have skill for dealing with SharePoint from now on wards. Windows Power Shell is an interactive command line and task based scripting technology which allows administrators to automate administrative tasks. From SharePoint viewpoint, Power Shell has significant performance benefits:

Here is the Power Shell script to enable a feature on every SPSite:


$rawdata = stsadm.exe -o enumsites -url $WebAppURL $sitexml = [XML]$rawdata $sitesxml.Sites | foreach-object{ $_.Site } | foreach-object{ stsadm -o activatefeature -url $_.url -filename $featureFileName if( $lastexitcode -ne 0 ){ Write-Host Failure:$lastexitcode `n" -Fore Red; $failure = $true; } }

It will take 12+ hours for 5300 SharePoint sites. Whereas same code in Power Shell would be like following:
Get-SPSite Limit ALL WebApplication $WebAppNameorUrl |%{ Enable-SPFeature $FeatureIdOrName url $_.Url }

And this will take only 30 minutes for same 5300 sites :-) So learn Power Shell and start rolling with all new 652 power shell cmdlets in SharePoint 2010 as compared to STSADM based 182 commands in SharePoint 2007.

You might also like