I have a global security group in active directory that has computer members in it. I want to export a list of them. I used dsquery to do this from an OU but cannot find the right syntax to do it from a security group. My current syntax is:
dsquery computer "?=security group,OU=Applications,ou=Groups,dc=ABC,dc=internal" -limit 0 -o rdn > c:\securitygroup_PCs.txt
What letters, instead of ?, go in front of =security group to indicate that it is a global security group and not an OU?
If it can't be done using dsquery, dsget or any other simple script will do.