Forum Discussion

Deleted's avatar
Deleted
Jul 02, 2018

Find app installed in PC

Hello 

 

I have a list of application which is pre installed in PC and i want to find out using powershell. so basically i want to write a script which will check that which app is installed from th app list. in my app list i have kind of candy crush, Farmville. 

  • You can report on those via Get-AppxPackage/Get-AppxProvisionedPackage, however the good folks at Microsoft have decided to be more and more annoying which each new release of W10 and the latest ones also feature some other mechanisms. Such as downloading apps directly upon detecting internet connectivity. They don't show up in the list of preinstalled apps, but will still be deployed and you have to deploy some registry keys as well...

     

    TL;DR version, read here: https://www.tenforums.com/tutorials/68217-turn-off-automatic-installation-suggested-apps-windows-10-a.html

    • Deleted's avatar
      Deleted

      I just want to write a script will check that any of the following script is running or not. i tried what you suggested and still it is not working properly. Here is my 

       

      ForEach($App in $AppsList) {

      $software = (Get-AppxPackage -allusers $App).PackageFullName
      $installed = (Get-ProvisionedAppxPackage -online | Where {$_.DisplayName -eq $software}) -ne $null

      if ($installed) {
      Write-Host "'$App' not found.";
      } else {
      Write-Host "'$App' found."
      }
      }

      • For starters the PackageFullName property is different from the DisplayName one, so you should not be comparing them directly. The Get-ProvisionedAppxPackage lists apps that are included in the windows image, not necessarily ones that are installed. If you only care about the installed ones, use just Get-AppxPackage, which will cover any app, regardless of the source it was installed from (as mentioned above, some will be directly downloaded from the internet).