Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
$FolderID = 16777224 # ContainerNodeID property value
$SiteCode = "PS1"
$Query = "select * from SMS_ApplicationLatest where ModelName is
in(select InstanceKey from SMS_ObjectContainerItem where ObjectType='6000' and ContainerNodeID='$FolderID')"
$ApplicationsInFolder = Get-WmiObject -Namespace "ROOT\SMS\Site_$SiteCode" -Query $Query
$ApplicationsInFolder
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.