Created
September 2, 2020 17:58
-
-
Save DanKinsella/b3b4a534fe23204c35affc56b296d3c2 to your computer and use it in GitHub Desktop.
Uninstall dependent BC apps
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Change searchApp to the name of your app, the script will uninstall any dependent apps | |
$searchApp = 'Customer Additional Fields' | |
$apps = get-navappinfo uat | |
foreach ($app in $apps) | |
{ | |
$appdetail = Get-navappinfo uat -name $app.Name | |
foreach ($dependency in $appdetail.Dependencies) { | |
if ($dependency.Name -eq $searchApp) { | |
Write-Host 'Uninstalling ' $appDetail.Name ' ' $appDetail.Version | |
Uninstall-Navapp uat -name $appDetail.Name | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment