Hi guys, hope you are all well.
Guys I have a command that generates the following:
dsquery group "CN=AU-SG SYD_tester,OU=GlobalGroups,OU=Groups,DC=au,DC=test,DC=electric,DC=com" | dsget group -members
"CN=sjones,OU=MEL,OU=Combined,OU=AllSites,DC=au,DC=test,DC=electric,DC=com"
"CN=psimms1,OU=SYD,OU=Combined,OU=AllSites,DC=au,DC=test,DC=electric,DC=com"
What I am trying to do is to find all members of the provided group.
Although at present it works, Im not happy with the fact that the output for each user is showing the FULL DN path to each user. Instead of this, Id rather just the samaccountid as follows:
dsquery group "CN=AU-SG SYD_tester,OU=GlobalGroups,OU=Groups,DC=au,DC=test,DC=electric,DC=com" | dsget group -members
sjones
psimms1
Any help on how I would modify my command to do this would be greatly appreciated.