Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.
PS C:\Windows\system32> Get-Service | Out-String -Stream | Select-String -Pattern "POP","IMAP"
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:\Windows\system32> Start-Service MSExchangeImap4
PS C:\Windows\system32> Start-Service MSExchangeIMAP4BE
# to enable Auto-start, set like follows
PS C:\Windows\system32> Set-Service MSExchangeImap4 -StartupType Automatic
PS C:\Windows\system32> 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:\Windows\system32> 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:\Windows\system32> Get-NetFirewallRule | Where-Object DisplayName -Like 'MSExchangeIMAP4 (TCP-In)' | Get-NetFirewallPortFilter
Protocol : TCP
LocalPort : {143, 993}
RemotePort : Any
IcmpType : Any
DynamicTarget : Any
|