I have a .wsp file that is deployed to the remote server by powershell script. The solution is deployed successfully and I can see the solution feature in the site collection features, I can activate this feature thru SharePoint UI, but I need activate it by powershell script.
I found that I should to use Enable-SPFeature command. In the Automating SharePoint 2010 with Windows PowerShell book says that this command is applays to features deployed via Farm and sendbox solution.
But when I tries to use command for my sandbox solution feature:
Enable-SPFeature featureName -Url siteUrl
I have following exception:
Enable-SPFeature : The Feature is not a Farm Level Feature and is not found in a Site level defined by the Url http://p s129-m. At line:1 char:17 + enable-spfeature <<<< "featureName" -Url "siteUrl" + CategoryInfo : InvalidData: (Microsoft.Share...etEnableFeature:SPCmdletEnableFeature) [Enable-SPFeature ], SPCmdletException + FullyQualifiedErrorId : Microsoft.SharePoint.PowerShell.SPCmdletEnableFeature
How can I activate sandbox solution feature on the remote server by powershell script?