0% found this document useful (0 votes)
296 views

Create and Modify Users

This document provides examples of dsadd and dsmod commands for adding and modifying different Active Directory objects like users, computers, and groups. It includes commands for creating a user account, modifying the user's profile path, adding a computer object, and creating security groups.

Uploaded by

Prince Deeraj
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as XLS, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
296 views

Create and Modify Users

This document provides examples of dsadd and dsmod commands for adding and modifying different Active Directory objects like users, computers, and groups. It includes commands for creating a user account, modifying the user's profile path, adding a computer object, and creating security groups.

Uploaded by

Prince Deeraj
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as XLS, PDF, TXT or read online on Scribd
You are on page 1/ 14

User Dsadd Statement UPN

PhxUser01 dsadd user cn=PhxUser01,ou=phoenix,dc=nuggetlab,dc=com -upn [email protected]


Paste these lines into a batch file

dsadd user cn=PhxUser01,ou=phoenix,dc=nuggetlab,dc=com -upn [email protected] -display PhxUser01 -pwd Nu6


Display PWD Mustchpwd Param Homedir Hmdrv
-display PhxUser01 -pwd Nu66et$ -mustchpwd yes -hmdir \\dcnugget1\home\$username$ -hmdrv H:
display PhxUser01 -pwd Nu66et$ -mustchpwd yes -memberof cn=phxusers,ou=phoenix,dc=nuggetlab,dc=com
Profile Memberof
-profile \\dcnugget1\profiles\$username$ -memberof cn=phxusers,ou=phoenix,dc=nuggetlab,dc=com
User HomeDir Change Perms
PhxUser01 MD D:\home\PhxUser01 xcacls D:\home\PhxUser01 /t /e /g PhxUser01:f /y /R users
User DsQuery Statement
PhxUser01 dsquery user ou=phoenix,dc=nuggetlab,dc=com

You can type B2 and C2 together in a command line easily.


If you want to customize so that you can add different
criteria, this spreadsheet might be a good place
to start. Again, consider the CONCATENATE function
DsMod Statement
| dsmod user -profile \\dcnugget1\profiles\$username$

ommand line easily.


n add different

NATE function
Computer Dsadd Statement SamName
Client51 dsadd computer cn=Client51,ou=tucson,dc=nuggetlab,dc=com -samid Client51

dsadd computer cn=Client51,ou=tucson,dc=nuggetlab,dc=com -samid Client51 -desc "Tucson Workstation" -loc "Main Campu
Description Location
-desc "Tucson Workstation" -loc "Main Campus"

c "Tucson Workstation" -loc "Main Campus" -memberof cn=TucsonComputers,ou=tucson,dc=nuggetlab,dc=com


MemberOf
-memberof cn=TucsonComputers,ou=tucson,dc=nuggetlab,dc=com

cn=TucsonComputers,ou=tucson,dc=nuggetlab,dc=com
Group Dsadd Statement Scope
PhxAdmins dsadd group cn=PhxAdmins,ou=phoenix,dc=nuggetlab,dc=com -scope l
PhxManagers dsadd group cn=PhxManagers,ou=phoenix,dc=nuggetlab,dc=com -scope g
PhxPeons dsadd group cn=PhxPeons,ou=phoenix,dc=nuggetlab,dc=com -scope u
PhxAssist dsadd group cn=PhxAssist,ou=phoenix,dc=nuggetlab,dc=com -scope g

dsadd group cn=PhxAdmins,ou=phoenix,dc=nuggetlab,dc=com -scope l


dsadd group cn=PhxManagers,ou=phoenix,dc=nuggetlab,dc=com -scope g
dsadd group cn=PhxPeons,ou=phoenix,dc=nuggetlab,dc=com -scope u
dsadd group cn=PhxAssist,ou=phoenix,dc=nuggetlab,dc=com -scope g
MemberOf Members

You might also like