Category Archives: dsget

Group SID

Group SID Some time we require a SID for the group in active directory, using the simple inbuilt windows command we can get the group SID You can use the below command to find the group SID Group SID (Group to SID) Groupname: sales_executes(Pre-Win2k Name) Syntax: dsquery group -name “groupname” | dsget group -sid Example:… Read More »

User to SID

Some time we require a SID for the user account in active directory, using the simple inbuilt windows command we can get the User to SID You can use the below command to find the User to SID User to SID (Username to SID) Username: Johnson (Pre-Win2k Name) Syntax: dsquery user -name “username” | dsget… Read More »

How to add all members of one group to the other group

Command to add members of one group to the other group (Group migration) If you want to add all the members from group1 to the group2 user the below command syntex: dsget group “Source group DN” -members | dsmod group “Destination group DN” -addmbr Example: dsget group “CN=Group1,OU=Test,DC=test,DC=com” -members | dsmod group “CN=Group2,OU=Test,DC=Test,DC=com” -addmbr Check… Read More »

To display the list of members with nested groups

Members from Nested Group To display the list of members, recursively expanded In the below command, you can extract the group membership details, if you have a group that member of this group then this command will extract all the members including the nested groups(group with in the group) So you will get all the… Read More »

How to verify KCC disabled

How to verify KCC disabled, do you know ISTG is enabled or disabled for you active directory sites, you check the ISTG status using below command command Verify KCC status on intersite (by default KCC enabled) dsquery site -name Default-First-Site-Name | dsget site –autotopology autotopologynodsget succeeded Note: If automatic inter-site topology generation is enabled (yes)… Read More »

Find the site name for given subnet in AD

Command to Find the site name for given subnet in AD, some time we know the IP and subnet and we have to find the site in active directory, you can use the below command dsquery subnet -name 192.168.1.0/24 | dsget subnet -site Subnet = 192.168.1.0/24 Please replece the above subnet with your subnet to… Read More »