Hi support,
We have security groups named like Test-Group--Users, where is different for each group.
I have a powershell query which gets a list of those Test-Group--Users" that user is part of
Get-Aduser -properties Name,SamAccountName,Department,co,MemberOf | Select Name, Department, @{n="Test Groups";e={((@($_.memberof.split(",")) -replace "CN=") -like "Test-Group-*") -join ","}}
I am trying to achieve this using Column in Adaxes but not sure how to proceed after this
$User = $Context.GetADObject()
$UserMemberOf = $User.Get("memberof")
#How can I iterate through memberof values in Adaxes scripting
$Context.Value = $UserMemberOf
Would appreciate any help with this. Thank you
Update I got a bit closer with this
$User = $Context.GetDirectoryObject()
$UserMemberOf = $User.Get("memberof")
$req = $UserMemberOf.where({$_ -like "CN=Test-Group-*"})
$Context.Value = $req[0]
But $req contains only Test-Group-<variable>-User that user is member of but it is an array