Home > Articles > Microsoft > MCSA

  • Print
  • + Share This
This chapter is from the book

Using Command-Line Utilities for Active Directory Objects

Microsoft added several useful command-line tools for managing Active Directory and Active Directory objects. In this chapter, you've already learned how to use the dsadd command for adding new computers, but dsadd can do more than just add computers and groups. You can use these new command-line utilities for Active Directory both locally and remotely, provided that you possess the necessary security permissions for the task that you are trying to complete. The following list details the commands that are available and discusses how you can use them:

  • DSADD.exeThis command adds a single computer, contact, group, OU, user, or quota specification to Active Directory. For help with the specific parameters and syntax for each type of object, type dsadd ObjectType /? at a command prompt. For example, dsadd user /? displays the available parameters (options) and syntax for adding a user to Active Directory.
  • DSGET.exeThis command displays the properties for computers, contacts, groups, OUs, partitions, quotas, servers (DCs), sites, subnets, and users in Active Directory. For help with the specific parameters and syntax for each type of object, type dsget ObjectType /? at a command prompt. For example, dsget server /? displays the available parameters (options) and syntax for viewing the properties of a specific domain controller.
  • DSMOD.exeThis command modifies the properties of a single computer, contact, group, OU, partition, quota, server, or user. For help with the specific parameters and syntax for each type of object, type dsmod ObjectType /? at a command prompt. For example, dsmod group /? displays the available parameters (options) and syntax for changing the properties of a specific group, including the ability to change the group type and group scope and adding or removing users.
  • DSMOVE.exeThis command moves or renames a single object within Active Directory. For help with the specific parameters and syntax for this command, type dsmove /? at a command prompt.
  • DSQUERY.exeThis command allows you to perform a search to locate computers, contacts, groups, OUs, partitions, quotas, servers (DCs), sites, subnets, or users within Active Directory. You can specify search criteria for finding Active Directory objects. The dsquery * command can find any type of Active Directory object. For help with the specific parameters and syntax for each type of object, type dsquery ObjectType /? at a command prompt. For example, dsquery computer /? displays the available parameters (options) and syntax for finding computers in Active Directory.
  • DSRM.exeThis command removes (deletes) objects within Active Directory. For help with the specific parameters and syntax for this command, type dsrm /? at a command prompt.
  • CSVDE.exeThis command exports data from Active Directory and imports data into Active Directory using the comma-separated values (CSV) file format. Programs such as Microsoft Excel and Microsoft Exchange Server administration utilities can read and write to CSV files. This tool is Microsoft's preferred method for automating the creation of user accounts in Active Directory using a bulk importing procedure. For help with the specific parameters and syntax for this command, type csvde (with no parameters) at a command prompt.
  • LDIFDE.exeThis command exports data from Active Directory and imports data into Active Directory using the Lightweight Directory Access Protocol (LDAP) Data Interchange Format (LDIF) file format. The LDIF files use the .ldf extension, and you can view and edit them using any simple text editor such as Notepad. For help with the specific parameters and syntax for this command, type ldifde (with no parameters) at a command prompt. This tool is not Microsoft's preferred method for automating the creation of user accounts in Active Directory using a bulk importing procedure.
  • + Share This
  • 🔖 Save To Your Account