The DSMod command is a Windows command line utility that allows users to modify objects in Active Directory. It is used to modify the properties of existing objects in the directory, such as users, groups, computers, and organizational units. DSMod is part of the Windows Server 2003 and Windows Server 2008 operating systems, and is available in the Command Prompt window.

What Does DSMod Do?

The DSMod command is used to modify existing objects in Active Directory. It can be used to modify the properties of users, groups, computers, and organizational units. For example, it can be used to change a user’s password, add a user to a group, or change the name of an organizational unit. It can also be used to modify the security settings of an object, such as setting permissions or granting access to a resource.

How to Use the DSMod Command

The DSMod command is used to modify existing objects in Active Directory. It is used in the Command Prompt window, and the syntax for the command is as follows:

dsmod objectname [-dn distinguishedname] [-samid samaccountname] [-desc description] [-disabled {yes | no}] [-pwd {password | *}] [-memberof groupname] [-secgrp {yes | no}] [-scope {domainlocal | global | universal}] [-s server] [-u user] [-p {password | *}] [-q] [-c] [-uc] [-upn userprincipalname] [-fn firstname] [-mi middlename] [-ln lastname] [-display displayname] [-empid employeeid] [-tel telephone] [-wwwhomepage webaddress] [-homedrive homedrive] [-homedir homedirectory] [-scriptpath logonscript] [-profilepath profilepath] [-mustchpwd {yes | no}] [-canchpwd {yes | no}] [-pwdneverexpires {yes | no}] [-acctexpires {date | never}] [-disabled {yes | no}] [-title title] [-dept department] [-company company] [-mgr manager] [-homedmserver homedmserver] [-profile homedmserver] [-homednsdomain homednsdomain] [-userexpires {date | never}] [-useraccountcontrol {useraccountcontrol}] [-codepage codepage] [-countrycode countrycode] [-timesensitivelogon {yes | no}] [-logonhours {logonhours}] [-comment comment] [-csp csp] [-msnexchhomeservername msnexchhomeservername] [-msnexchhomemta msnexchhomemta] [-msnexchpolicyexclude msnexchpolicyexclude] [-msnexchpolicyname msnexchpolicyname] [-msnexchrecipientdisplaytype msnexchrecipientdisplaytype] [-msnexchumdtmfmap msnexchumdtmfmap] [-msnexchumhookswitchdelay msnexchumhookswitchdelay] [-msnexchumhottracking msnexchumhottracking] [-msnexchummailboxcontext msnexchummailboxcontext] [-msnexchummailboxflags msnexchummailboxflags] [-msnexchummailboxlanguage msnexchummailboxlanguage] [-msnexchummailboxotherattributes msnexchummailboxotherattributes] [-msnexchummailboxstoragequotas msnexchummailboxstoragequotas] [-msnexchumspeechlanguage msnexchumspeechlanguage] [-msnexchversion msnexchversion] [-extensionattribute1 extensionattribute1] [-extensionattribute2 extensionattribute2] [-extensionattribute3 extensionattribute3] [-extensionattribute4 extensionattribute4] [-extensionattribute5 extensionattribute5] [-extensionattribute6 extensionattribute6] [-extensionattribute7 extensionattribute7] [-extensionattribute8 extensionattribute8] [-extensionattribute9 extensionattribute9] [-extensionattribute10 extensionattribute10]

The command can be used to modify the properties of an existing object in the directory. For example, to change a user’s password, the following command can be used:

dsmod user username -pwd newpassword

This command will change the user’s password to the new password specified. To add a user to a group, the following command can be used:

dsmod group groupname -addmbr username

This command will add the specified user to the specified group. To change the name of an organizational unit, the following command can be used:

dsmod ou ou_name -desc new_ou_name

This command will change the name of the organizational unit to the new name specified.

Options for the DSMod Command

The DSMod command has a number of options that can be used to modify the properties of an existing object in the directory. These options include:

  • -dn: This option is used to specify the distinguished name of the object to be modified.
  • -samid: This option is used to specify the SAM account name of the object to be modified.
  • -desc: This option is used to specify the description of the object to be modified.
  • -disabled: This option is used to specify whether the object is disabled or not.
  • -pwd: This option is used to specify the password of the object to be modified.
  • -memberof: This option is used to specify the group to which the object should be added.
  • -secgrp: This option is used to specify whether the object is a security group or not.
  • -scope: This option is used to specify the scope of the object.
  • -s: This option is used to specify the server on which the object is located.
  • -u: This option is used to specify the user name of the object to be modified.
  • -p: This option is used to specify the password of the user.
  • -q: This option is used to specify whether the command should run in quiet mode or not.
  • -c: This option is used to specify whether the command should run in continuous mode or not.
  • -uc: This option is used to specify whether the command should run in Unicode mode or not.
  • -upn: This option is used to specify the user principal name of the object to be modified.
  • -fn: This option is used to specify the first name of the object to be modified.
  • -mi: This option is used to specify the middle name of the object to be modified.
  • -ln: This option is used to specify the last name of the object to be modified.
  • -display: This option is used to specify the display name of the object to be modified.
  • -empid: This option is used to specify the employee ID of the object to be modified.
  • -tel: This option is used to specify the telephone number of the object to be modified.
  • -wwwhomepage: This option is used to specify the web address of the object to be modified.
  • -homedrive: This option is used to specify the home drive of the object to be modified.
  • -homedir: This option is used to specify the home directory of the object to be modified.
  • -scriptpath: This option is used to specify the logon script of the object to be modified.
  • -profilepath: This option is used to specify the profile path of the object to be modified.

Leave a Reply