Korzystając z tej witryny, zgadzasz się na Polityka prywatności.
Przyjąć
EnterinITEnterinITEnterinIT
  • DOM
  • IT PRO
  • TECH
  • MICROSOFT
    • Lazur
    • Menedżer konfiguracji/SCCM
    • DPM
    • Orkiestrator
    • Hyper-V
    • Niejawny tester Microsoft Edge
    • MSI
    • Biuro 365
    • Nieznajomy biura
    • Power BI
    • Skype'a
    • Serwer SQL
    • Zespoły
  • OKNA
    • Centrum administracyjne systemu Windows
    • Klient Windowsa
    • Serwer Windows
  • Lista kolekcji zapytań SCCM
Czytanie: How to Change a User’s Primary Email Address in Office 365 using PowerShell
Zmiana rozmiaru czcionkiAaa
EnterinITEnterinIT
Zmiana rozmiaru czcionkiAaa
  • DOM
  • IT PRO
  • TECH
  • MICROSOFT
  • OKNA
  • Lista kolekcji zapytań SCCM
Szukaj
  • DOM
  • IT PRO
  • TECH
  • MICROSOFT
    • Lazur
    • Menedżer konfiguracji/SCCM
    • DPM
    • Orkiestrator
    • Hyper-V
    • Niejawny tester Microsoft Edge
    • MSI
    • Biuro 365
    • Nieznajomy biura
    • Power BI
    • Skype'a
    • Serwer SQL
    • Zespoły
  • OKNA
    • Centrum administracyjne systemu Windows
    • Klient Windowsa
    • Serwer Windows
  • Lista kolekcji zapytań SCCM
Biuro 365

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

Opublikowano w lutym 11, 2024
2 Min. odczyt
UDZIAŁ

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

1. Uruchom 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. Teraz 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 OK, 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
OZNACZONE:Exchange OnlineMicrosoft Office 365PowerShellOknaOkna 10
Poprzedni artykuł Lista kolekcji zapytań programu Menedżer konfiguracji Configuration Manager Windows Server 2016 Active Directory Schema
Następny artykuł Okna 10 Creators Update Update Assistant tool
Zostaw komentarz Zostaw komentarz

Zostaw odpowiedź Anuluj odpowiedź

Twój adres e-mail nie zostanie opublikowany. Wymagane pola są zaznaczone *

Ta strona korzysta z Akismet w celu ograniczenia spamu. Dowiedz się, jak przetwarzane są dane dotyczące Twoich komentarzy.

Tłumaczenie

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

Popularne posty

Wymagania systemowe dla serwera Windows 2016
Serwer Windows
Lista kolekcji zapytań programu Menedżer konfiguracji
Lista kolekcji zapytań programu Menedżer konfiguracji
Menedżer konfiguracji
Nawigacja strukturalna/zarządzana włączona na nowoczesnych stronach w klasycznych witrynach zespołu
Tech
SCCM Nie udało się uzyskać lokalizacji DP w oczekiwanej wersji z MP
Menedżer konfiguracji

Ostatnie posty

Instalowanie i konfigurowanie Fail2ban dla ochrony SSH na Ubuntu 24.04
Linuksa
Włączanie i konfiguracja FirewallD na AlmaLinux
Linuksa
Tworzenie użytkownika i konfiguracja klucza SSH w AlmaLinux
Linuksa
Jak zresetować hasło w AlmaLinux
Linuksa

© 2023 EnterinIT

Przejdź do wersji mobilnej
baner reklamowy
Witamy z powrotem!

Zaloguj się na swoje konto

Nazwa użytkownika lub adres e-mail
Hasło

Zgubiłeś hasło?