728x90

1. dsquery 사용방법

* 단일 사용자 추출 시,

   dsquery user "CN=Test01,OU=H134,OU=GR,DC=GRDC,DC=CONTOS,DC=COM"

 

* 모든 사용자 추출 시,

    dsquery user

Syntax

dsquery * [{<StartNode> | forestroot | domainroot}] [-scope {subtree | onelevel | base}] [-filter <LDAPFilter>] [-attr {<AttributeList> | *}] [-attrsonly] [-l][{-s <Server> | -d <Domain>}] [-u <UserName>] [-p {<Password> | *}] [-q] [-r] [-gc] [-limit <NumberOfObjects>] [{-uc | -uco | -uci}]

 

참고 : https://technet.microsoft.com/ko-kr/library/cc754232.aspx

 

2. dsmod 사용방법

   dsquery user "CN=Test01,OU=H134,OU=GR,DC=GRDC,DC=CONTOS,DC=COM" | dsmod user -display 테스트01 -fn 테스트01

  Test01 사용자를 쿼리 하여 displayname과 first Name를 "테스트01"로 변경 하였다

Syntax

dsmod user <UserDN> ... [-upn <UPN>] [-fn <FirstName>] [-mi <Initial>] [-ln <LastName>] [-display <DisplayName>] [-empid <EmployeeID>] [-pwd (<Password> | *)] [-desc <Description>] [-office <Office>] [-tel <PhoneNumber>] [-email <E-mailAddress>] [-hometel <HomePhoneNumber>] [-pager <PagerNumber>] [-mobile <CellPhoneNumber>] [-fax <FaxNumber>] [-iptel <IPPhoneNumber>] [-webpg <WebPage>] [-title <Title>] [-dept <Department>] [-company <Company>] [-mgr <Manager>] [-hmdir <HomeDirectory>] [-hmdrv <DriveLetter>:] [-profile <ProfilePath>] [-loscr <ScriptPath>] [-mustchpwd {yes | no}] [-canchpwd {yes | no}] [-reversiblepwd {yes | no}] [-pwdneverexpires {yes | no}] [-acctexpires <NumberOfDays>] [-disabled {yes | no}] [{-s <Server> | -d <Domain>}] [-u <UserName>] [-p {<Password> | *}][-c] [-q] [{-uc | -uco | -uci}]

 

참고 : https://technet.microsoft.com/en-us/library/cc732954.aspx

 

끝.

 

 

 

728x90

+ Recent posts