Saturday, 27 September 2014

Commands for Active directory admin (windows admin)

To create user
==============

dsadd user "cn=a1,cn=users,dc=vision,dc=com" -samid a1 -upn a1@vision.com -pwd 123_abc


to create user in a OU
======================
dsadd user "cn=a2,ou=sales,dc=vision,dc=com" -samid a2 -upn a2@vision.com -pwd 123_abc


to create OU
===========
dsadd ou "ou=sales,dc=vision,dc=com"


to create group
===============
dsadd group "cn=marketing,cn=users,dc=vision,dc=com" -samid marketing


to add user to a group
======================
dsmod group "cn=marketing,cn=users,dc=vision,dc=com" -addmbr "cn=a2,ou=sales,dc=vision,dc=com"


to delete a user/group/ou
=========================
dsrm "cn=a2,ou=sales,dc=vision,dc=com"


to find which group a user belongs to
=======================================
Dsget “cn=testuser,cn=users,dc=vision,dc=com” –memberof


to find the global catalog
==========================

dsquery server -isgc


to find domain controller in a domain
=====================================
dsquery server



To check a DC
=============
dcdiag


to import or export ads database in CSV format
===============================================

import = csvde -i -f one.csv
export = csvde -f one.csv

to import or export ads database in LDF format
===============================================

import = ldifde -i -f one.ldf
export = ldifde -f one.ldf

No comments:

Post a Comment