I understand stand the App upgrade process for a SharePoint hosted app and when I update my App Catalog for the web application I then can upgrade the app successfully manually for a site.

But my question is my site collection contains 20+ sites. Each site uses the app. In the past when using solutions I used a Site collection feature, updated the feature and all sites got the upgrade.

How can I have all 20+ sites update to the newer version without going through each site manually and updating it one site at a time?


1 Answer 1


Like with most things of this nature it's PowerShell to the rescue. Basically you can get the App instance, Import the updated package, then update the instance with the new package.

$AppInstanceOnSite = Get-SPAppInstance -web "<URL>" | Where {$_.Title -eq "<AppName>"};
$NewAppFile = Import-SPAppPackage -Path <local path to .app file> -site <URL> -source ObjectModel;
Update-SPAppInstance -identity $AppInstanceOnSite -App $NewAppFile;

As far as I know there is now way to retrieve the app package without importing it via PowerShell (that is if you already deployed it). It's possible this slipped by me in some update, if anyone is aware maybe that can add that here.

Just to add clarity here - there is another method for deploying Apps. You can deploy the App directly to the App catalog site and allow a shared instance to be provisioned on sites. When you do this all sites share the same "app web" that is deployed to the Catalog site, so in this scenario when you upgrade the App every one is "upgraded" because it's not really deployed to all those sites. Beyond the shared assets drawback, you also can't deploy anything to host webs.

  • Jesus thanks for getting back to me. Actually I was looking into the Import-SPAppPackage PS command but I was completely stuck on what app catalog it was putting it in, because it wasnt updating the web application catalog. Also, I looked at the Shared Instance but that doesnt seem to work with app parts :(. It just works for full page apps.
    – NYTom
    Commented Dec 12, 2014 at 2:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.