DevOps/Windows

[AD] Active Directory 그룹 생성 및 삭제

Michael Kim 2022. 5. 15. 02:31

AD 그룹 생성

- AD 그룹을 생성

New-ADGroup -Name "<GroupName>" -SamAccountName <GroupName> -GroupCategory Security -GroupScope Global -DisplayName "<GroupName>" -Path "CN=Users" -Description "Group Description"

 

AD 그룹 삭제

- AD 그룹을 삭제

 

- 그룹을 제거 하는 명령어이기 때문에 삭제 여부 메시지 창이 발생하게 된다.

Remove-ADGroup -Identity "<GroupName>"

 

- 위의 명령어 처럼 메시지 창 확인 필요없이 제거 할 때 -Confirm 옵션을 사용하면 된다.

Remove-ADGroup -Identity "<GroupName>" -Confirm:$false