We have deployed a wsp using:
Add-SPSolution -LiteralPath $path
install-spsolution -Identity $solution -GACDeployment -Force
This wsp has 2 features, one scoped at application level (FeatureA) and one scoped at site collection level (FeatureB). Both can be seen and activated/deactivated from the respective UI's.
I would like to know how to activate them via powershell.
I tried:
Enable-SPFeature -identity "FeatureB" -confirm:$false -url $oUrl
Gives error as:
Enable-spfeature : The Feature is not a Farm Level Feature and is not found in a Site level defined by the Url
http://dewswift:7676/
. At line:1 char:1 + Enable-spfeature -identity "FeatureB" -confirm:$f ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidData: (Microsoft.Share...etEnableFeature:SPCmdletEnableFeature) [Enable-SPFeature], SPCmdletException + FullyQualifiedErrorId : Microsoft.SharePoint.PowerShell.SPCmdletEnableFeature