Forum Discussion
Find app installed in PC
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
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."
}
}
- VasilMichevJul 03, 2018MVP
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).
- DeletedJul 03, 2018
Hi VasilMichev
As you said i am using only get-Appxpackage but still its not working how it suppose to work. i have a list of package which need to be find apps is installed in pc but some application is not installed and it still says it is installed.
$PackageFullName = (Get-AppxPackage -allusers $App).PackageFullNamewrite-host $PackageFullNameif ($PackageFullName){Write-Host "Removing Package: $App"}else{Write-Host "Unable to find package: $App"}- DeletedJul 03, 2018Here is the update code
$PackageFullName = (Get-AppxPackage -allusers $App).PackageFullName
write-host $PackageFullName
if ($PackageFullName)
{
Write-Host "Package found : $App"
}
else
{
Write-Host "Unable to find package: $App"
}