본문 바로가기
기술자료 (KB)/Cloud

Powershell - Microsoft 365 메일그룹 만들기

by 이완주 2024. 8. 28.

[문의사항]

      Microsoft 365에 메일 그룹을 Powershell을 이용하여 만들고자 한다.

 

[문의답변]  

#AzureAD 모듈 설치 - 모듈은 이미 설치되어 있으시면 생략 가능
Install-Module -Name AzureAD

#Azure AD 연결 - 관리자 계정으로 연결
connect-AzureAD


# Install the Exchange Online module (only if not already installed)
Install-Module -Name ExchangeOnlineManagement

# 현재 실행 정책 확인
Get-ExecutionPolicy

# 실행 정책을 "RemoteSigned"로 설정 (필요한 경우)
Set-ExecutionPolicy RemoteSigned -Scope CurrentUser

# Connect to Exchange Online
Connect-ExchangeOnline -UserPrincipalName wjlee@globalsoft.co.kr


# Create a Mail Distribution Group
New-DistributionGroup -Name "MailGroupTest" -Alias "MailGroupTest" -PrimarySmtpAddress "MailGroupTest@globalsoft.co.kr"

 

[결과 확인]

댓글