prevent multiple packages from getting returned
This commit is contained in:
@@ -55,7 +55,7 @@ If ( IsWindowsBuild -ge 9200 )
|
|||||||
ForEach ( $App in $AppList ) {
|
ForEach ( $App in $AppList ) {
|
||||||
# Get the full name for the package and provisioned package
|
# Get the full name for the package and provisioned package
|
||||||
$PackageFullName = $($(Get-AppxPackage $App).PackageFullName)
|
$PackageFullName = $($(Get-AppxPackage $App).PackageFullName)
|
||||||
$ProPackageFullName = $($(Get-AppxProvisionedPackage -Online | Where-Object {$_.Displayname -eq $App}).PackageName)
|
$ProPackageFullName = $($(Get-AppxProvisionedPackage -Online | Where-Object {$_.Displayname -eq $App}).PackageName | Select-Object -First 1)
|
||||||
|
|
||||||
# If the package exists, uninstall it
|
# If the package exists, uninstall it
|
||||||
If ($PackageFullName) {
|
If ($PackageFullName) {
|
||||||
|
|||||||
Reference in New Issue
Block a user