从我的O365删除旧目录 [英] Delete old Directory from my O365

查看:81
本文介绍了从我的O365删除旧目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,

我在大约一年前在我的O365上设置了Azure AD同步,但我使用Windows服务器创建了新的服务器2019.我所做的是从头开始并移动用户,政策等......它有一个不同的域和netbios名称。我想让我的O365成为一个"本地"的
再次复制并添加azure广告同步但不能删除Azure中的目录,因为当我去删除用户时它会变灰。

I set up Azure AD sync on my O365 about year ago but I created new server using windows server 2019. What I did was start from scratch and moved over users, policy, etc... It has a different domain and netbios name. I wanted to make my O365 a "local" copy again and add the azure ad sync but cant delete the directory from Azure because when i go to delete users it is greyed out.

不确定在整体上将O365报废并开始那么新的时候真的要做什么......

Not sure what really to do thinking of scrapping O365 as a whole and starting that fresh too...

推荐答案

要删除具有灰显删除按钮的用户,请使用PowerShell。第一个是使用UPN,第二个是所有用户。最后一个用于回收站中的所有用户,如果这会阻止您做某事。 

To delete a user that has a grayed out delete button is using PowerShell. The first is for one using UPN and the second is for all users. The last is for all users in the recycle bin if this prevents you from doing something. 

Remove-MsolUser -UserPrincipalName <UPN>


get-msoluser -maxresults unlimited | remove-msoluser –force


get-msoluser –returndeletedusers -maxresults 100000 | remove-msoluser -removefromrecyclebin -force


这篇关于从我的O365删除旧目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆