Hi all,
I've been working with SharePoint for quite a while now, deploying my solutions with Powershell to automate my installation throughout the whole farm with following commands:
$sln = Add-SPSolution mySolution.wsp
Install-SPSolution -Identity mySolution.wsp -GACDeployment -Force
Enable-SPFeature -Identity [GUID] -url http://... -Force
This time I got the requirement that the solution should be installed in the farm but the feature should only be installed but not activated, so later an admin will be able go to "site collection features" and enable it only for the sites where he needs the feature.
Deploying this with Visual Studio works flawlessly when I set the scope of the feature to "site". However when I try to deploy the .wsp with site scope feature via powershell with the commands above the feature still does get activated for all sites on the farm, but it shows under "site collection features" as not activated.
I experimented with different Enable-SPFeature parameters and also Install-SPFeature, every time with the same result. Then I took a step back and did the deployment only with those 2 commands:
$sln = Add-SPSolution mySolution.wsp
Install-SPSolution -Identity mySolution.wsp -GACDeployment -Force
This again resulted in the features getting activated on all the sites of the farm.
I also tried setting the "activate on default" property of the feature to "false", which didn't help either. It can't be any sort of caching issue since I'm running IE in private mode for testing.
I know it works with Visual Studio so it should also work with a simple Powershell script, but at this point I just don't see how. All helpful comments are welcome, thanks in advance!