Jvierra,jvierra wrote: ↑Thu Feb 08, 2018 1:34 pm The code you posted lists only group membership and has nothing to do with applications.
This is the code you posted:
foreach ($computer in $computers) {
$strCMP=GET-ADComputer $computer –Properties cn,MemberOf
$strGRP=($strCMP.MemberOf | Sort Name | foreach {($_.Split(','))[0].Substring(3)}) -Join ","
$strCMP=($strCMP.cn | foreach {($_.Split('='))[0]}) -Join ","
$strDone=$strCMP+","+$strGRP
Add-Content c:\outputfiles\$dt"ComputersandGroupsList.txt" -value $strdone
}
Note that there is no mention of any products - only computers ad "MemberOf". Did you post the wrong script?
My company uses AD in some very non-standard ways. Don't ask me why because no one who was here when this was created and implemented is still around.
The "member of" field in our AD is for groups, as you say, but the group(s) your computer is assigned to determine(s) which application(s) are installed on the computer the first time it connects to the domain. Hence, my referral to "member of" as an "application instance package group"
Example
Our admins assign a brand new computer (just the basic OS load) to the "AdobeAcrobatPro_WNX" group, join it to the domain, and deploy it to the user. The user logs in and the update scripts automatically start, which installs Adobe Acrobat Pro for Windows 10 9and all the other applications that user is supposed to have on their computer.)
In essence, because the computer is a "member of" that particular "group", it automatically receives the install for AcorbatPro for Windows 10 (and any security/compatibility updates are automatically applied as they are released over the life span of that application and/or computer)
Those "application instance package" groups are, in turn, assigned to other groups (nested group membership) and the script I posted evidently pulls some, but not all the groups...and I'm not sure why it's grabbing some but not all groups.