1

I am using following command to get the users of Active Directory Global Group.

dsquery group -name "Groupname" |dsget group -members

But, this is piped command and it's not working in Visual Studio, Please suggest me any alternative DOS command without using pipe which can work on standalone server.

1 Answers1

0

Finally I found the answer,you can use following command to achieve this

dsget group "Group DN Name" -members

To get group DN Name you need following command

dsquery group -name "Groupname"

By using Both command you can get the result.

To run dsget and dsquery command you must have Windows Remote Server Administrative Tool Installed and enabled in your system.

Alternatively you can use net user command which doesn't requires elevation and Remote Server Administration Tool both.

net user /domain "Groupname"