您的位置:首页 > 其它

国际版删除域名的步骤

2017-04-12 20:20 218 查看
第一步:使用Microsoft Azure Active Directory Module for Windows Powershell连接至office365 管理中心: Connect-msolservice   (输入全局管理员账号)
第二步:查看是否有用户或者组在使用需要删除的域名,并将这些用户以及组或者联系人导出来到CSV 文件。
输入命令查看在使用需要被删除的用户(请将msoffice.linkpc.net 替换为需要被删除的域名):
Get-MsolUser -DomainName msoffice.linkpc.net -all | Export-Csv d:\user.csv
输入命令查看在使用需要被删除的组和联系人:
Get-msolgroup -all | where {$_.proxyaddresses -match "msoffice.linkpc.net" } | Export-Csv d:\group.csv
Get-msolcontact -all | where {$_.emailaddress -match "msoffice.linkpc.net" } | Export-Csv d:\contact1.csv
Get-msolcontact -all | where {$_.ProxyAddresses -match "msoffice.linkpc.net" } | Export-Csv d:\contact2.csv
第三步: 运行命令删除与该域名相关的用户,组,联系人:
Get-MsolUser -DomainName msoffice.linkpc.net -all | remove-msoluser -force (用户被删除到已删除用户列表)
Get-MsolUser -ReturnDeletedUsers -all | Remove-MsolUser -RemoveFromRecycleBin -force  (从已删除的用户列表里面讲用户永久删除)
Get-msolgroup -all | where {$_.proxyaddresses -match "msoffice.linkpc.net" } | remove-msolgroup -force (强制删除所有与该域名有关组)
Get-msolcontact -all | where {$_.emailaddress -match "msoffice.linkpc.net" } | remove-msolcontact -force (删除与域名有关的联系人)
Get-msolcontact -all | where {$_.ProxyAddresses -match "msoffice.linkpc.net" } | remove-msolcontact -force (删除与域名有关的联系人)
第四布:当确认好域名已经没有邮件地址或者用户和组在使用时,可以直接将domain在office365管理中心删除,该过程有些慢,或者使用命令
Remove-MsolDomain -DomainName msoffice.linkpc.net -force
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: