Skip to content

Demos

Important Note! You must have the Remote Server Administration Tools for Windows downloaded in order to be able to execute commands against the DC or run PowerShell AD commands. You will also need this for the Demo on Domain Management. Students have the KB located in C:\Users\Public.

Command Prompt Commands

  • Net User - used to add a user to either the Domain or to the Local Machine. Must use /domain in order to add to the Domain.
    1
    2
    3
    4
    5
    6
    7
    C:\windows\system32>net group /?
    The syntax of this command is:
    
    NET GROUP
    [groupname [/COMMENT:"text"]] [/DOMAIN]
                 groupname {/ADD [/COMMENT:"text"] | /DELETE}  [/DOMAIN]
                 groupname username [...] {/ADD | /DELETE} [/DOMAIN]
    
  • Net Group - used to add a group to either the Domain or to the Local Machine. Must use /domain in order to add to the Domain.
    1
    2
    3
    4
    5
    6
    7
    C:\windows\system32>net group /?
    The syntax of this command is:
    
    NET GROUP
    [groupname [/COMMENT:"text"]] [/DOMAIN]
                 groupname {/ADD [/COMMENT:"text"] | /DELETE}  [/DOMAIN]
                 groupname username [...] {/ADD | /DELETE} [/DOMAIN]
    
  • dsquery - This tool's commands suite allow you to query the directory according to specified criteria. Each of the following dsquery commands finds objects of a specific object type, with the exception of dsquery *, which can query for any type of object.
    C:\windows\system32>dsquery /?
    
    dsquery computer - finds computers in the directory.
    dsquery contact - finds contacts in the directory.
    dsquery subnet - finds subnets in the directory.
    dsquery group - finds groups in the directory.
    dsquery ou - finds organizational units in the directory.
    dsquery site - finds sites in the directory.
    dsquery server - finds AD DCs/LDS instances in the directory.
    dsquery user - finds users in the directory.
    dsquery quota - finds quota specifications in the directory.
    dsquery partition - finds partitions in the directory.
    dsquery * - finds any object in the directory by using a generic LDAP query.
    
  • dsadd - This tool's commands add specific types of objects to the directory.
    1
    2
    3
    4
    5
    6
    7
    8
    C:\windows\system32>dsadd /?
    
    dsadd computer - adds a computer to the directory.
    dsadd contact - adds a contact to the directory.
    dsadd group - adds a group to the directory.
    dsadd ou - adds an organizational unit to the directory.
    dsadd user - adds a user to the directory.
    dsadd quota - adds a quota specification to a directory partition.
    

PowerShell Commands

  • Add-ADGroup Member - Adds one or more members to an Active Directory group.
  • Get-ADComputer – Gets one or more Active Directory computers.
  • Get-ADDomain – Gets an AD domain.
  • Get-ADDomainController – Gets one or more Active Directory domain controllers based on discoverable services criteria, search parameters or by providing a domain controller identifier, such as the NetBIOS name.
  • Get-ADForest – Gets a AD Forest.
  • Get-ADGroup – Gets one or more AD groups.
  • Get-ADGroupMember – Gets the members of an Active Directory group.
  • Get-ADOrganizationalUnit – Gets one or more AD OUs.
  • Get-ADUser – Gets one or more AD users.