Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.
PS C:\Users\exchangeadmin> Get-Service -DisplayName "*POP*", "*IMAP*"
Status Name DisplayName
------ ---- -----------
Stopped MSExchangeImap4 Microsoft Exchange IMAP4
Stopped MSExchangeIMAP4BE Microsoft Exchange IMAP4 Backend
Stopped MSExchangePop3 Microsoft Exchange POP3
Stopped MSExchangePOP3BE Microsoft Exchange POP3 Backend
# for example, start IMAP4 related services
PS C:\Users\exchangeadmin> Start-Service MSExchangeImap4
PS C:\Users\exchangeadmin> Start-Service MSExchangeIMAP4BE
# to enable Auto-start, set like follows
PS C:\Users\exchangeadmin> Set-Service MSExchangeImap4 -StartupType Automatic
PS C:\Users\exchangeadmin> Set-Service MSExchangeIMAP4BE -StartupType Automatic
# after staring IMAP4 services, it listens on 143/tcp, 993/tcp
# * if POP3, it listens on 110/tcp, 995/tcp
PS C:\Users\exchangeadmin2> netstat -a | Select-String -Pattern ":143",":993"
TCP 0.0.0.0:143 rx-7:0 LISTENING
TCP 0.0.0.0:993 rx-7:0 LISTENING
TCP [::]:143 rx-7:0 LISTENING
TCP [::]:993 rx-7:0 LISTENING
# firewall rules has been already configured
PS C:\Users\exchangeadmin> Get-NetFirewallRule -DisplayName 'MSExchangeIMAP4 (TCP-In)' | Get-NetFirewallPortFilter
Protocol : TCP
LocalPort : {143, 993}
RemotePort : Any
IcmpType : Any
DynamicTarget : Any
|