Forum Discussion
Deleted
Jul 02, 2018Find 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 t...
Deleted
Jul 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"
}
$PackageFullName = (Get-AppxPackage -allusers $App).PackageFullName
write-host $PackageFullName
if ($PackageFullName)
{
Write-Host "Package found : $App"
}
else
{
Write-Host "Unable to find package: $App"
}
MB_Smith
Aug 05, 2018Iron Contributor
As Vasil wrote, don't use PackageFullname. Use DisplayName.
Here is a script I run during computer deployment:
[CmdletBinding()]Param()#### Remove everything but StickyNotes, Paint, Photos, Calc#### Michael B. Smith## April 4, 2018## michael@smithcons.com#### No warranties, etc. etc.#### Somewhat based on## https://gal.vin/2017/04/06/removing-uwp-apps-mdt/#### But do NOT do a 'Get-AppxPackage | Remove-AppxPackage -AllUsers'.## You will break Windows.#### The initial posting on this topic from Michael Niehaus in 2015:## https://blogs.technet.microsoft.com/mniehaus/2015/11/11/removing-windows-10-in-box-apps-during-a-task-sequence/##$keepers = @('Microsoft.MicrosoftStickyNotes','Microsoft.MSPaint','Microsoft.Windows.Photos','Microsoft.WindowsCalculator','Microsoft.StorePurchaseApp','Microsoft.WindowsStore')$packages = Get-AppxProvisionedPackage -Onlineforeach( $package in $packages ){if( $keepers -contains $package.DisplayName ){Write-Verbose "Will NOT remove $( $package.DisplayName )"}else{Write-Verbose "WILL remove $( $package.DisplayName )"Write-Verbose "PackageFullName $( $package.PackageName )"Remove-AppxPackage -Package $package.PackageName -AllUsers -VerboseRemove-AppxProvisionedPackage -Online -PackageName $package.PackageName -Verbose -ErrorAction SilentlyContinue}}$packages = $null