IT STORYs

Microsoft 365 프로필 사진 변경하지 못하도록 설정 본문

M365

Microsoft 365 프로필 사진 변경하지 못하도록 설정

295~ 2023. 6. 21. 13:17

PowerShell을 관리자 권한으로 실행합니다.

B번 과정에서 희림 전역관리자 계정을 입력합니다.

아래 과정을 진행하여 현재 사용자는 프로필 사진 변경이 안됩니다.

 
  1. Exchange Online PowerShell 모듈 설치(미구성시)
https://docs.microsoft.com/en-us/powershell/exchange/exchange-online-powershell-v2?view=exchange-ps
Set-ExecutionPolicy RemoteSigned
Install-Module -Name ExchangeOnlineManagement
 
  1. Exchange Online PowerShell로 로그인
Import-Module ExchangeOnlineManagement; Get-Module ExchangeOnlineManagement
$UserCredential = Get-Credential
Connect-ExchangeOnline -Credential $UserCredential -ShowProgress $true
 
  1. 사용자의 사진설정을 허용하지 않음
Set-OwaMailboxPolicy -Identity OwaMailboxPolicy-Default -SetPhotoEnabled $false
 
  1. 설정이 적용된 것을 확인
Get-OwaMailboxPolicy |select setphoto*
SetPhotoEnabled SetPhotoURL
--------------- -----------
          False

관리자가 사용자 프로필 사진 변경하는 방법 1 (PowerShell 이용)

 
https://docs.microsoft.com/en-us/powershell/exchange/exchange-online-powershell-v2?view=exchange-ps
Set-ExecutionPolicy RemoteSigned
Install-Module -Name ExchangeOnlineManagement
Import-Module ExchangeOnlineManagement; Get-Module ExchangeOnlineManagement
$UserCredential = Get-Credential
Connect-ExchangeOnline -Credential $UserCredential -ShowProgress $true
https://docs.microsoft.com/en-us/powershell/module/exchange/set-userphoto?view=exchange-ps
Set-UserPhoto -Identity "Paul Cannon" -PictureData ([System.IO.File]::ReadAllBytes("C:\Users\Administrator\Desktop\PaulCannon.jpg"))
Identity 로 사용자를 지정할 수 있는 속성은 이름, 메일주소, UPN 등을 사용할 수 있습니다.
Remove-UserPhoto -Identity "Ann Beebe"
 

 

 

관리자가 사용자 프로필 사진 변경하는 방법 2 (M365 관리센터 이용)

  • 일부 유저를 대상으로 사진을 변경할 때 PowerShell이 아닌 Office 365 관리센터에서 변경하는 것이 가능합니다.
  • [Office 365 관리센터 – 사용자 – 활성 사용자] 를 선택합니다. 사진을 변경 혹은 추가할 유저를 선택하고 [사진 변경] 을 선택하여 파일을 업로드 합니다파일 업로드 후 [변경 내용 저장] 클릭하면 사진이 저장됩니다. 변경된 사진이 모든 시스템에 적용되기 까지 24시간 정도 시간이 소요될 수 있습니다.
  • 설정된 사진의 삭제만 할 경우 PowerShellRemove-UserPhoto 로만 삭제할 수 있습니다.
 
 


 
 
Comments