Exchange Server에서 사용자 계정과 그에 대한 사서함을 한꺼번에 만들기


1) 메모장 및 엑셀 프로그램으로 csv 파일 생성
** 제일 위줄을 잘 적어야 한다
name, surname, givenname, samaccountname, city
yslee, lee, yongshik, yslee, seoul
peace, lee, pyeonghwa, peace, seoul
comforter, lee, lowoon, comforter, seoul

** name, samaccountname는 필수 항목. 이 항목은 Get-ADuser -Identity administrator | Get-Member 로 속성(property)를 확인한 것이다. 그리고 반드시 도움말 Help new-aduser를 확인한다.
** 만들 csv 파일을 확인하기 위해 import-csv c:\userlist.csv

2) csv 파일을 이용하여 한꺼번에 AD 계정 생성하기
import-csv c:\userlist.csv | new-aduser
** Active Directory Module for Windows Powershell에서 작업

3) 생성한 계정을 lab OU로 이동한다.
4) 암호 재설정하기
Get-ADuser -Filter * -Searchbase “ou=lab, dc=powershell, dc=kr” |
Set-ADAccountPassword -Reset -NewPassword (Read-Host -Promt “Your password” -AsSecureString)

** 암호는 Pa$$w0rd로 입력한다.

5) 계정 Enable 하기
Get-ADuser -Filter * -Searchbase “ou=lab, dc=powershell, dc=kr” | Enable-ADAccount

6) 한꺼번에 여러개의 사서함 만들기
Get-User -OrganizationalUnit “lab” | Enable-Mailbox -Database “Accounting”
** Exchange Management Shell에서 작업

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s