How to permanently delete user account from deleted users without waiting 30 days in Office 365?

Office 365 မှာ ပုံမှန်အားဖြင့် Delete လုပ်လိုက်တဲ့ User Account ဟာ Deleted Users ဆိုတဲ့ List မှာ ရှိနေပါသေးတယ်။
Restore ပြန်လုပ်လို့ရအောင်ပေါ့။ ဒါပေမယ့် တခါတလေမှာ Account Creation လုပ်တုန်းမှားသွားလို့ ဖျက်ပြီး ပြန်အသစ်လုပ်တဲ့အခါ Display Name လိုဟာမျိုး တူနေရင် အသစ်လုပ်မရပါဘူး။
ဖြစ်လေ့ဖြစ်ထရှိတဲ့ ပြဿနာတွေက ဒီလိုတွေဗျ
- " Unable to restore user from a deleted state because of following error(s):  Value 'user@yourdomain.com' for property 'UserPrincipalName' conflicts with another object in the directory. Value ‘user@yourdomain.com’ for property 'ProxyAddress' conflicts with another object in the directory." ဆိုတာမျိုးတွေ DirSync Report မှာ ပေါ်လာတတ်တယ်။
- User က https://login.microsoftonline.com ကိုဝင်ပြီး Web Apps ကို သုံးရတယ်။ ဒါပေမယ့် Desktop and Mobile တွေမှာ သုံးမရဘူး။
- Global Address List ထဲမှာ Multiple User တွေဖြစ်နေမယ်။
- Lync Online မှာ Same User (Multiple User) တွေ ပေါ်နေမယ်။

ဒီတော့ ဒီပြဿနာတွေ ဖြစ်အောင်လုပ်နေတဲ့ Account ကို ဖျက်ဖို့ ရက်ပေါင်း ၃၀ စောင့်ပြီးမှ အသစ်ပြန်ဆောက်ရမလိုဖြစ်နေပြီပေါ့။
မလိုပါဘူး။ ဒီပြဿနာကို ကျတော်တို့ Powershell ကနေ ရှင်းရအောင်။

ဥပမာအားဖြင့် Display Name: Test User 1, e-mail address: testuser1@ictformyanmar.com ဆိုတာကို Deleted Users List ထဲကနေ (တနည်းအားဖြင့် Office 365 ရဲ့ Recycle Bin ထဲကနေ) Powershell သုံးပြီး ဖျက်ကြည့်ရအောင်။

အသုံးပြုရမယ့် Powershell က ဒီလိုပါ။

Deleted Users List ထဲက Account တွေကို List လုပ်မယ်။
Get-MsolUser –ReturnDeletedUsers  | select UserPrincipalName, ObjectId

ObjectID နဲ့ တိုက်ပြီး မိမိဖျက်ချင်တဲ့ Account ကို ဖျက်မယ်။
Remove-MsolUser -RemoveFromRecycleBin –ObjectId ObjectId

အောက်ကပုံလေးမှာ နမူနာ လုပ်ပြထားပါတယ်။ Highlight လုပ်ပြထားတဲ့နေရာတွေမှာ မိမိဖျက်ချင်တဲ့ Account ကို အစားထိုးပြီး သုံးပေါ့ဗျာ။







ကဲ...ဒါပါပဲ။

ပျော်ရွှင်ပါစေဗျာ။
(Be knowledgeable, pass it on then)


No comments :

Post a Comment