active directory users and computers group members code example Example: list ad groups in powershell: gpresult /V