STSADM Batch Operation PowerShell Cmdlets in Batch.

1 2 ...
Author: Blaise Parks
0 downloads 5 Views

1

2

3

4 STSADM Batch Operation PowerShell Cmdlets in Batch

5 $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; } Get-SPSite –Limit ALL –WebApplication $WebAppNameorUrl |%{ Enable-SPFeature $FeatureIdOrName –url $_.Url } 12+ Hours (5300 SPSites) 12+ Hours (5300 SPSites) 30 Minutes (5300 SPSites) 30 Minutes (5300 SPSites)

6

7

8

9

10