Skip to content

Instantly share code, notes, and snippets.

@devendrasv
Created April 10, 2013 16:27
Show Gist options
  • Save devendrasv/904346e30916333e11e6 to your computer and use it in GitHub Desktop.
Save devendrasv/904346e30916333e11e6 to your computer and use it in GitHub Desktop.
Add-PSSnapin Microsoft.SharePoint.PowerShell
$webapp= Get-SPWebApplication "http://www.sharepoint-journey.com/"
# looping through all sitecollections
foreach($site in $webApp.Sites)
{
# looping through all sites
foreach($website in $site.allwebs)
{
#Get the feature based on display name
$feature=Get-SPFeature -web $website | Where-object {$_.DisplayName -eq "Branding"}
if($feature -ne $null)
{
# Disply the site site URL
Write-host "Feature Activated at" $website.URL
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment