Forums on Intune, SCCM, and Windows 11

Welcome to the forums. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your topics and posts, as well as connect with other members through your own private inbox!

NEW Move applications to retired folder

dj3094

Well-Known Member
Messages
241
Reaction score
7
Points
18
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
 

Forum statistics

Threads
7,207
Messages
28,117
Members
18,391
Latest member
joita

Latest posts

Back
Top