title: Installation of UWP app fails with error 0x80070005: Adding a tile failed with unexpected error
body: <p>I am trying a install a UWP app using the powershell command </p>
  
  <p>Start-Process powershell " -ExecutionPolicy Unrestricted -NoExit -Command <code>"cd \</code>"C:\Users\Administrator\Documents\Visual Studio 2015\Projects\App3\AppPackages\App3\App3_1.0.0.0_x64_Test`"; &amp; <code>.\Add-AppDevPackage.ps1</code> -Force`" |Out-File C:\Users\Administrator\Desktop\log.txt" -Verb RunAs -Wait</p>
  
  <p>where AppDevPackage.ps1 is the powershell script provided in the app.</p>
  
  <p>The script runs fine when I run it by using right-click -> run with powershell.But when I try to invoke the script using a jenkins or using a scheduled task the below error is thrown:</p>
  
  <p>Add-AppxPackage : Deployment failed with HRESULT: 0x80073CF6, Package could not be registered.</p>
  
  <p>error 0x80070005: Adding a tile failed with unexpected error.</p>
  
  <p>NOTE: For additional information, look for [ActivityId] 5e8c5432-8277-0004-c28f-8c5e7782d201 in 
  the Event Log or use the command line Get-AppxLog -ActivityID 5e8c5432-8277-0004-c28f-8c5e7782d201</p>
  
  <p>At C:\Users\Administrator\Documents\Visual Studio 
  2015\Projects\App3\AppPackages\App3\App3_1.0.0.0_x64_Test\Add-AppDevPackage.ps1:388 char:13
  +             Add-AppxPackage -Path $DeveloperPackagePath.FullName -Dep ...
  +             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      + CategoryInfo          : WriteError: (C:\Users\Admini....0.0.0_x64.appx:String) [Add-AppxPac 
     kage], IOException
      + FullyQualifiedErrorId : DeploymentError,Microsoft.Windows.Appx.PackageManager.Commands.AddA 
     ppxPackageCommand</p>
  
  <p>I looked the event log as well,even that gives the same error code.I need to run this script for automation,hence can't run this manually.</p>