Monday, 25 March 2013

Find all the sites where the feature is activated

Hi,

I have been struggling how to find out the lists of sites where my feature is deployed.

Below PowerShell command which helped me.

Get-SPSite -limit ALL -WebApplication "http://demo.com.au" | Get-SPWeb -limit ALL | foreach{ Write-Output $_.Url; $_.features["a372b122-7c5b-4141-92a1-61979629a106"] }> c:\output.txt
view raw gistfile1.ps1 hosted with ❤ by GitHub


Instead of  using "Write-Host", I have used "Write-Output" which will give output in my output.txt file.

Note: Write-Host will write the output in the console while Write-Output helps to write the output in some file.

Hope this is useful.
Cheers,
Isha

No comments:

Post a Comment