Which Windows PowerShell cmdlet should you run?

You deploy SharePoint Server 2013.
You need to install a SharePoint hosted app named App1 in a site.
Which Windows PowerShell cmdlet should you run?

You deploy SharePoint Server 2013.
You need to install a SharePoint hosted app named App1 in a site.
Which Windows PowerShell cmdlet should you run?

A.
Install-SPSolution and then run Add-SPSolution

B.
Import-SPAppPackage and then run Install-SPApp

C.
Add-SPSolution and then run Install-SPSolution

D.
Install-SPAppPackage and then run Import-SPApp

Explanation:
The Add-SPSolution cmdlet adds a SharePoint solution package to the farm. This cmdlet does not deploy
the uploaded SharePoint solution. Use the Install-SPSolution cmdlet to deploy the SharePoint solution in
the farm.
Example:
Install-SPSolution -Identity contoso_solution.wsp -GACDeployment -CompatibilityLevel {14,15}This example deploys the installed SharePoint solution installs a previously added solution so it can be
used correctly in both 14 and 15 mode site collections.



Leave a Reply 2

Your email address will not be published. Required fields are marked *


Bob saget

Bob saget

What?? Install-SPSolution and Add-SPSolution are about farm solutions. This question is about sharepoint hosted apps. The correct answer I think is B. Import-SPAppPackage followed by Install-SPApp