Hello We are trying to move applications with no deployments, not part of TS and also not added to any deployment type as dependency. I came up with below code, but what can i add to check if the application is added as dependency for naother app.
$applications = Get-CMApplication | Where-Object {($_.numberofdeployments -eq 0) -or ($_.NumberOfDependentTS -eq 0) } | Select-Object LocalizedDisplayName, DateCreated
foreach ($app in $applications){
Move-CMObject -FolderPath "XYZ:\Application\TestFolder" -InputObject $app
}
Thanks in Advance
$applications = Get-CMApplication | Where-Object {($_.numberofdeployments -eq 0) -or ($_.NumberOfDependentTS -eq 0) } | Select-Object LocalizedDisplayName, DateCreated
foreach ($app in $applications){
Move-CMObject -FolderPath "XYZ:\Application\TestFolder" -InputObject $app
}
Thanks in Advance