Hello I would like to run a script to enable a site collection feature on all sites within a web application. Here is my script:
Add-PSSnapin -name "Microsoft.SharePoint.PowerShell"
$SPWebApp = Get-SPWebApplication http://sharepointtest/
foreach ($SPSite in $SPWebApp.Sites)
{
Enable-SPFeature -Identity Reporting -url $SPSite
}
I think I am not passing the url correctly as it gives this error:
Anyone know what I am doing wrong! Not the best with powershell by all means!