Disable POP3, IMAP, MAPI, Outlook Web App or Exchange ActiveSync in Office 365

Quản trị Office 365 riết cũng nhàm chán nên buồn buồn ngồi disable kết nối mailbox của vài users chơi ^^!

Trong bài viết này, tôi xin chia sẽ một vài lệnh để  enable or disable một số giao thức kết nối mailbox trong Exchange Online in Office 365:

  • Post Office Protocol (POP)
  • Internet Message Access Protocol (IMAP)
  • Messaging Application Programming Interface (MAPI)
  • Outlook Web App
  • Microsoft Exchange ActiveSync




To enable POP3 for a specific user, run the following cmdlet:


  • Set-CASMailbox <Alias,Primary SMTP, or UPN> -PopEnabled $True


To disable POP3 for a specific user, run the following cmdlet:


  • Set-CASMailbox <Alias, Primary SMTP, or UPN> -PopEnabled $False


To enable IMAP for a specific user, run the following cmdlet:


  • Set-CASMailbox <Alias, Primary SMTP, or UPN> -ImapEnabled $True

To disable IMAP for a specific user, run the following cmdlet:


  • Set-CASMailbox <Alias, Primary SMTP, or UPN> -ImapEnabled $False


To enable MAPI for a specific user, run the following cmdlet:


  • Set-CASMailbox <Alias, Primary SMTP, or UPN> -MAPIEnabled $True


To disable MAPI for a specific user, run the following cmdlet:


  • Set-CASMailbox <Alias, Primary SMTP, or UPN> -MAPIEnabled $False


To enable Outlook Web App for a specific user, run the following cmdlet:


  • Set-CASMailbox <Alias, Primary SMTP, or UPN> -OWAEnabled $True

To disable Outlook Web App for a specific user, run the following cmdlet:


  • Set-CASMailbox <Alias, Primary SMTP, or UPN> -OWAEnabled $False


To enable Exchange ActiveSync for a specific user, run the following cmdlet:


  • Set-CASMailbox <Alias, Primary SMTP, or UPN> -ActiveSyncEnabled $True

To disable Exchange ActiveSync  for a specific user, run the following cmdlet:


  • Set-CASMailbox <Alias, Primary SMTP, or UPN> -ActiveSyncEnabled $False


To enable EWS for an Exchange Online mailbox, run the following cmdlet:


  • Set-CASMailbox <Alias, Primary SMTP, or UPN> -EWSEnabled $True

To disable EWS for an Exchange Online mailbox, run the following cmdlet:


  • Set-CASMailbox <Alias, Primary SMTP, or UPN> -EWSEnabled $False


Tôi thì lười biếng gõ từng lệnh nên quất một lần luôn:
All users:
Get-CasMailbox -ResultSize Unlimited | Set-CASMailbox -PopEnabled $False -ImapEnabled $False -MAPIEnabled $False -OWAEnabled $False -ActiveSyncEnabled $False -EWSEnabled $False -OWAForDevicesEnabled $False 
 Trong câu lệnh trên, tôi có thêm "-ResultSize Unlimited" vì công ty có hơn 1000 users ^^!

Nếu chỉ khóa 1 user thì dùng lệnh sau:

Set-CASMailbox lecuong@vnsysadmin.com -PopEnabled $False -ImapEnabled $False -MAPIEnabled $False -OWAEnabled $False -ActiveSyncEnabled $False -EWSEnabled $False -OWAForDevicesEnabled $False 


Ai không rõ gì thì để lại cmt, tôi sẽ trả lời. :)

Good luck ^^!


BÀI VIẾT LIÊN QUAN

Post a Comment

Vui lòng tuân thủ một số quy tắc sau:

» Nội dung phải liên quan tới chủ đề bài viết, không spam.
» Viết bằng tiếng Việt có dấu hoặc tiếng Anh.

Hi vọng các bạn tìm được những kiến thức bổ ích khi tình cờ ghé thăm blog này.