Використовуючи цей сайт, ви погоджуєтеся з Політика конфіденційності.
прийняти
ЕнтеринЕнтеринЕнтерин
  • ДІМ
  • Це про
  • ТЕХ
  • Microsoft
    • Лазурний
    • Configmgr/sccm
    • DPM
    • Оркестрант
    • Гіпер-V
    • Інсайдер Microsoft Edge
    • MSI
    • Офіс 365
    • Інсайдер Office
    • Потужність BI
    • Скайп
    • SQL Server
    • Команди
  • ВІКНА
    • Центр адміністрування Windows
    • Клієнт Windows
    • Windows Server
  • Список колекції запитів SCCM
Читання: How to Change a User’s Primary Email Address in Office 365 using PowerShell
Зміна розміру шрифтуАа
ЕнтеринЕнтерин
Зміна розміру шрифтуАа
  • ДІМ
  • Це про
  • ТЕХ
  • Microsoft
  • ВІКНА
  • Список колекції запитів SCCM
Пошук
  • ДІМ
  • Це про
  • ТЕХ
  • Microsoft
    • Лазурний
    • Configmgr/sccm
    • DPM
    • Оркестрант
    • Гіпер-V
    • Інсайдер Microsoft Edge
    • MSI
    • Офіс 365
    • Інсайдер Office
    • Потужність BI
    • Скайп
    • SQL Server
    • Команди
  • ВІКНА
    • Центр адміністрування Windows
    • Клієнт Windows
    • Windows Server
  • Список колекції запитів SCCM
Офіс 365

How to Change a User’s Primary Email Address in Office 365 using PowerShell

Опублікований: Лютий 11, 2024
2 Хв. читання
ПОДІЛИТИСЯ

How to Change a User’s Primary Email Address in Office 365 using PowerShell.

1. Run the PowerShell as administrator;

2. To run the scripts needed to change a user’s primary email address we must first set the script execution policy.

Get-ExecutionPolicy

3. The execution policy needs to be RemoteSigned. RemoteSigned allows only downloaded scripts signed by a trusted publisher to be run. If Get-ExecutionPolicy doesn’t return RemoteSigned, it must be changed by typing the following cmdlet and entering a “y” when prompted;

Set-ExecutionPolicy RemoteSigned

4. Now Get-ExecutionPolicy returns RemoteSigned;

5. Next we need to provide Office 365 with administrative credentials to be able to make changes. We’re going to assign our credentials to the variable $cred;

$cred = Get-Credential

6. And PowerShell prompts for an Office 365 account with administrative permissions;

  7. After entering the credentials of an Office 365 administrator account and clicking добре, we need to open a connection to the Office 365 servers;

$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/powershell -Credential $cred -Authentication Basic -AllowRedirection

8. Once the connection is open we need to import the commands for the Exchange Server shell;

Import-PSSession $Session

9. The following command sets a user’s primary email address from the current address to the desired address without changing the username;

Set-Mailbox -identity <user@current.com> -WindowsEmailAddress <user@new.com>

10. The Office 365 online administrative interface should show the new email address as the primary;

11. Don’t forget close session;

Remove-PSSession $Session
ПОМІЧЕНО:Exchange OnlineMicrosoft Office 365PowerShellвікнавікна 10
Попередня стаття Список колекції запитів диспетчера конфігурацій Configuration Manager Windows Server 2016 Active Directory Schema
Наступна стаття вікна 10 Creators Update Update Assistant tool
Залиште коментар Залиште коментар

Залиште відповідь Скасувати відповідь

Ваша електронна адреса не буде опублікована. Обов'язкові поля позначені *

Цей сайт використовує Akismet для зменшення спаму. Дізнайтеся, як обробляються дані ваших коментарів.

Переклад

English中文(简体)DanskNederlandsFrançaisDeutschItaliano한국어PolskiPortuguêsRomânăEspañolУкраїнська
за Transposh - translation plugin for wordpress

Популярні публікації

Системні вимоги для Windows Server 2016
Windows Server
Список колекції запитів диспетчера конфігурацій
Список колекції запитів диспетчера конфігурацій
Configmgr
Структуровану/керовану навігацію ввімкнено на сучасних сторінках класичних сайтів групи
техн
SCCM Не вдалося отримати розташування DP як очікувану версію від MP
Configmgr

Останні дописи

Встановлення та налаштування Fail2ban для захисту SSH на Ubuntu 24.04
Лінійка
Увімкнення та налаштування FirewallD на AlmaLinux
Лінійка
Створення користувача та налаштування ключа SSH в AlmaLinux
Лінійка
Як скинути пароль на AlmaLinux
Лінійка

© 2023 Ентерин

Перейдіть до мобільної версії
Ласкаво просимо назад!

Увійдіть у свій обліковий запис

Ім'я користувача або адреса електронної пошти
Пароль

Забули пароль?