70-332 · Question #69
You need to redeploy the Time Entry app. Which two Windows PowerShell cmdlets should you run? (Each correct answer presents a complete solution. Choose two.)
The correct answer is A. Import-SPAppPackage. Redeploying a SharePoint app requires importing the app package into the farm using Import-SPAppPackage to register it before it can be made available.
Question
Options
- AImport-SPAppPackage
- BUpdate-SPAppInstance
- CInstall-SPSolution
- DUninstall-SPApp
How the community answered
(18 responses)- A72% (13)
- B17% (3)
- C6% (1)
- D6% (1)
Why each option
Redeploying a SharePoint app requires importing the app package into the farm using Import-SPAppPackage to register it before it can be made available.
Import-SPAppPackage imports an .app package file into a specified site collection, registering the app with the farm and making it available for installation, which constitutes a full redeployment. This cmdlet is the required first step in redeployment because it publishes the app package to the SharePoint environment before any install or update operations can proceed.
Update-SPAppInstance updates an already-running app instance to a newer version and requires the app to be currently installed, so it cannot handle the package import step needed for a full redeployment.
Install-SPSolution is used to deploy farm-level WSP solution packages, not SharePoint app model packages (.app files), and is entirely inapplicable to the app deployment workflow.
Uninstall-SPApp removes an installed app from a site without redeploying it, so running it alone would leave the app completely removed with no redeployment occurring.
Concept tested: SharePoint app package import and redeployment PowerShell cmdlets
Source: https://learn.microsoft.com/en-us/powershell/module/sharepoint-server/import-spapppackage
Topics
Community Discussion
No community discussion yet for this question.