AL/Remove-ALTestDependencies.ps1
function Remove-ALTestDependencies { Param( [Parameter(Mandatory=$false)] [string] $containerName = "", [Parameter(Mandatory=$false)] [string] $sourcePath = (Get-Location) ) if ($null -eq $ContainerName -or $ContainerName -eq "") { $ContainerName = (Get-EnvironmentKeyValue -KeyName 'name') } $testapps = Get-EnvironmentKeyValue -SourcePath $sourcePath -KeyName "testapps" if ($testapps.PSObject.Properties.name -match "appId" -and $dependencies.PSObject.Properties.name -match "appId") { $dependencies = Get-AppKeyValue -SourcePath $sourcePath -KeyName "dependencies" $dependencies = $dependencies | Where-Object {$testapps.appId -notcontains $_.appId} Set-AppKeyValue -SourcePath $sourcePath -KeyName "dependencies" -KeyValue $dependencies } } Export-ModuleMember Remove-ALTestDependencies |