Ok, I will try this and have the first blocker
How to read the rule?
I tried this
[Reflection.Assembly]::LoadWithPartialName("Softerra.Adaxes.Adsi")
# Connect to the Adaxes service
$ns = New-Object "Softerra.Adaxes.Adsi.AdmNamespace"
$service = $ns.GetServiceDirectly("localhost")
# Bind to the group
$groupDN = "mygroupdn"
$group = $service.OpenObject("Adaxes://$groupDN", $null, $null, 0)
#
$rules = $group.MembershipRules
$rules shows me
Type : ADM_BUSINESSUNITMEMBERSHIPTYPE_QUERY
BaseObjectPath : Adaxes://<GUID=17894c9b-0451-4e83-a5c2-962ab06ac1e7>
BaseObjectDnTemplate :
Scope : ADS_SCOPE_SUBTREE
Exclude : False
Disabled : False
How can I now read/create/update the rule?