Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Batch modification of Office 365 (21V) user domain name suffix

2025-03-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/03 Report--

Premise: pure cloud Azure AD authentication; you have added the domain name of your own company to Office 365, and you have imported or created users of Office 365 before adding the domain name of your company.

Accounts are suffixed with @ basehome.partner.onmschina.cn. What if you want to change it to @ basehome.com.cn?

Directly select the user you need to modify, and click Edit

Select as basehome.com.cn and save it.

If there are more than 100 users or more, how to modify them in batches?

In fact, it is very simple. Select all users and uncheck your first Office 365 global administrator account.

You can choose "Edit Domain", of course, you can also batch reset passwords, assign licenses, edit user roles, and so on. Another way to do this is to use Powershell:

If you need to use Powershell, you first need to install a Powershell module on your computer that can connect to Office 365Azure AD

Http://www.microsoft.com/zh-cn/download/details.aspx?id=41950

Downloaded is the installation package for msoidcli_64.msi (64-bit system)

Open Powershell as an administrator after installation

Execute Install-Module AzureAD and wait for module installation to complete

Installation completed

Next, execute Install-Module MSOnline to install the Microsoft Azure Active Directory module for Windows PowerShell

Next, execute Connect-MsolService to connect to Azure AD of Office 365, but domestic version 21V executes Connect-MsolService-AzureEnvironment AzureChinaCloud

Next, execute the following command to batch replace the user's suffix to basehome.com.cn

Get-MsolUser-All-DomainName basehome.partner.onmschina.cn |% {$t = $_ .userprincipalname; Set-MsolUserPrincipalName-UserPrincipalName $t-NewUserPrincipalName $t.replace ('basehome.partner.onmschina.cn','basehome.com.cn')}

After this execution, Office 365 users can see that the suffix of the primary login name of all users is basehome.com.cn.

It should be noted here that because it is all modified, then by default, the account of a major Office 365global administrator will also be changed. It is recommended that you manually change this account to a domain name with the suffix partner.onmschina.cn in the WEB interface of the portal to facilitate management, otherwise the next time you log in as the global administrator of the first Office 365created, you will find that you cannot log in because the main domain name has changed.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report