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 ^^!
http://blog.vnsysadmin.com/2017/05/disable-pop3-imap-owa-activesync-office-365.html