29 авг. 2018 г.

Найти и удалить Windows (универсальные) приложения

How To Find Removable AppxPackages

######### Create Variables ################ $appxpackages = Get-AppxPackage -AllUsers | % {if($_.SignatureKind -eq “store”){$_.name}} $output = “$env:USERPROFILE\desktop\appxpackages.txt” ######### Get All AppxPackges That Are Removable ################ foreach ($app in $appxpackages){ ######### Get The Location Of The AppxPackage ################ foreach ($location in (Get-AppxPackage -name $app).InstallLocation){ ######### Get The Executable Files Of The AppxPackage ################ $exes = Get-Childitem $location *.exe -Recurse ######### Get Each Individual Executable File Of The AppxPackage ################ foreach ($exe in $exes){ ######### Get The Name Executable File Of The AppxPackage ################ $name = ($exe).name ######### Verify Accesabiliy To The Executable File Of The AppxPackage ################ $testpath = Test-Path “$location\$name“ if ($testpath -eq $true){ foreach ($n in $name) { ######### Get The Application Name Of The Executable File Of The AppxPackage ################ $appname = (Get-Item “$location\$name“).versioninfo.productname if ($appname -ne $null){ ######### Output The Application Name And AppxPackage Name To The User’s Desktop ################ if ($appname -ne “”){ “Application Name: $appname“| Out-File $output -NoClobber -Append “AppxPackage Name: $app” | Out-File $output -NoClobber -Append “———————————-| Out-File $output -NoClobber -Append } } } } } } }

Оригинал

Комментариев нет:

Отправить комментарий

 

CopyPaste Copyright © 2017 - |- Шаблон создан O Pregador - |- Отредактирован myr4ik07