Modify

Commands

dsmod user

Modifies properties of a user account.

dsmod group

Modifies properties of a group.

dsmod computer

Modifies properties of a computer object.

dsadd

Adds objects to Active Directory, such as users, groups, or organizational units.

dsmod

Modifies properties of Active Directory objects.

dsrm

Removes Active Directory objects.

dsquery

Queries Active Directory for objects that match specified criteria.

ldifde

Imports and exports data to and from Active Directory using LDIF (LDAP Data Interchange Format).

csvde

Imports and exports data to and from Active Directory using CSV (Comma-Separated Values) files.

ntdsutil

A command-line utility for managing various aspects of Active Directory, including metadata cleanup and database maintenance.

adprep

Used for preparing a forest and domain for the introduction of a new version of Windows Server.

netdom

A tool for managing computer accounts, trust relationships, and joining or disjoining computers from domains.

Set-ADUser

Modifying user account properties in Active Directory.

Set-ADGroup

Modifying group properties in Active Directory.

Set-ADComputer

Modifying computer object properties in Active Directory.

New-ADUser

Creating new user accounts in Active Directory.

New-ADGroup

Creating new groups in Active Directory.

New-ADOrganizationalUnit

Creating new organizational units in Active Directory.

Remove-ADObject

Removing Active Directory objects.

Move-ADObject

Moving Active Directory objects between organizational units.

Enable-ADAccount

Enabling disabled user accounts.

Disable-ADAccount

Disabling user accounts.

Add-ADGroupMember

Adding members to groups in Active Directory.

Remove-ADGroupMember

Removing members from groups in Active Directory.

Add-ADPrincipalGroupMembership

Adding users to groups in Active Directory.

Remove-ADPrincipalGroupMembership

Removing users from groups in Active Directory.

Guest Account

Enable guest account:

Set guest account password. Blank password:

Add guest to "Domain Admins group":

If guest password was set:

Create account with no password

Set the password:

Enable account:

Add to "Domain Admins group":

Remove from "Domain Admins group":

Disable guest account:

Add Objects

Users

Add User and set properties:

"CN=NewUser,OU=Users,DC=example,DC=com" specifies the distinguished name (DN) of the new user.

-samid NewUser sets the SamAccountName for the user.

-upn [email protected] sets the User Principal Name (UPN) for the user.

-fn [firstname] specifies the first name of the user.

-ln [lastname] specifies the last name of the user.

-display "[DisplayName]" sets the display name for the user.

-pwd Password123 specifies the initial password for the user.

Adding a User Using Command Prompt (CMD):

Adding a User Using PowerShell (New-ADUser cmdlet from RSAT):

Adding a User Using PowerShell (Add-ADUser cmdlet from RSAT):

Adding a User Using Get-CimInstance (PowerShell WMI):

Add user using WMIC:

Groups

Add new group:

Adding a Group Using PowerShell (New-ADGroup cmdlet from RSAT):

Add Member:

Computer

Adding a Computer Using Command Prompt (CMD):

Adding a Computer Using PowerShell (Add-ADComputer cmdlet from RSAT):

OU

Adding an Organizational Unit (OU) Using PowerShell (New-ADOrganizationalUnit cmdlet from RSAT):

Printer

Adding a Printer Using PowerShell (Add-Printer cmdlet):

Share

Adding a Shared Folder Using PowerShell (New-SmbShare cmdlet):

DNS Record

Adding a DNS Record Using PowerShell (Add-DnsServerResourceRecordA cmdlet):

Certificates

Adding a Certificate Using PowerShell (Import-PfxCertificate cmdlet):

Modify Objects

Users

Change User Password:

Change User description:

Groups

Change Description:

Delete Objects

Users

User from the "Users" Container:

Group from the "Groups" Organizational Unit

Deleting an Organizational Unit (OU)

Computer Object

Contact Object

Printer Object

Security Group

Distribution Group

Application Object

Exchange Mailbox

Last updated

Was this helpful?