I developed a SharePoint 2010 WSP that contains a custom HTTP Module for performing short-url redirects. The WSP also contains a WebApplication scoped feature that consists of a feature receiver that updates the web.config with a reference to the HTTP Module.
My problem is that when I install the WSP using powershell, it automatically enables the feature for all of the web applications on the server, with the exception of the Central Administration web application. I would like to be able to specify which web applications the feature is enabled for in my powershell deployment scripts.
Here is my script:
add-spsolution -LiteralPath "C:\temp\MyRedirectModule.wsp" install-spsolution -Identity "MyRedirectModule.wsp" -GACDeployment
I have tried doing this:
install-spsolution -Identity "MyRedirectModule.wsp" -WebApplication http://mysite -GACDeployment
but this results in the following error message: This solution contains no resources scoped for a Web application and cannot be deployed to a particular Web application.
Thanks for your help!