Need a VPN for Windows?
Get ExpressVPN NowLove ExpressVPN? Want a free month?
Refer a Friend NowThis guide will show you how to use the ExpressVPN command-line control in Windows Command Prompt.
ExpressVPN command line interface (CLI) can be used to control the ExpressVPN app for Windows in Windows Command Prompt.
This is an advanced tool that can be used as a means of controlling and automating the app to connect, disconnect, and more.
cd C:\Program Files (x86)\ExpressVPN\services\Jump to…
View list of commands
Connect to a VPN server location
Disconnect from a VPN server location
Connect to a different VPN server location
Switch to a different VPN protocol
Connection information
Split tunneling
Block ads, trackers, and harmful sites
Enable (or disable) Internet Kill Switch
Check app version
Sign out of your account
View list of commands
To see a list of commands you can use, run the following command:
expressvpnctl -h
Need help? Contact the ExpressVPN Support Team for assistance.
Connect to a VPN server location
To connect to the VPN, run the command:
expressvpnctl connect
If you are connecting for the first time, ExpressVPN will use the Smart Location feature to select a server location, which is recommended to you based on factors such as speed and proximity.
If this is not your first time connecting, ExpressVPN will connect to the server location you most recently connected to.
Need help? Contact the ExpressVPN Support Team for assistance.
Disconnect from a VPN server location
To disconnect from a VPN server location, run this command:
expressvpnctl disconnect
ExpressVPN will disconnect from the server it is connected to.
Need help? Contact the ExpressVPN Support Team for assistance.
Connect to a different VPN server location
List of server locations
To find a list of VPN server locations to connect to, enter the following command in the terminal:
expressvpnctl get regions
Connect to a specific VPN server location
To connect to a specific server location, enter:
expressvpnctl connect "[LOCATION]"
For example, to connect to USA – New York, enter:
expressvpnctl connect “USA - New York”
Connect to the Smart Location
To connect to the Smart Location:
expressvpnctl connect smart
Need help? Contact the ExpressVPN Support Team for assistance.
Switch to a different VPN protocol
VPN protocols are the methods by which your device connects to a VPN server. For the best experience, ExpressVPN recommends using the Automatic protocol option. This is selected by default and automatically picks the protocol most appropriate for your network.
In some cases, switching to a different protocol can give you faster connection speeds.
To switch to Lightway – TCP, run the following command:
expressvpnctl set protocol lightwaytcp
To switch to Lightway – UDP, run the following command:
expressvpnctl set protocol lightwayudp
To switch to WireGuard, run the following command:
expressvpnctl set protocol wireguard
To switch to OpenVPN – TCP, run the following command:
expressvpnctl set protocol openvpntcp
To switch to OpenVPN – UDP, run the following command:
expressvpnctl set protocol openvpnudp
To use the Automatic option, run this command:
expressvpnctl set protocol auto
Need help? Contact the ExpressVPN Support Team for assistance.
Connection information
To check your connection status, run the following command:
expressvpnctl status
Need help? Contact the ExpressVPN Support Team for assistance.
Split tunneling
Split tunneling enables you to choose which apps use the VPN and which apps don’t when you are connected to ExpressVPN. This allows you to access both local and blocked content on your Windows PC.
To enable split tunneling, run the command:
expressvpnctl set splittunnel true
Once enabled, you can decide which apps bypass the VPN and which apps use the VPN.
To add apps you wish to bypass the VPN, run the command:
expressvpnctl set split-app bypass[ROUTE TO FOLDER WHERE THE APP IS LOCATED]
For example, if you wanted the VPN to bypass Firefox, you would run the command:
expressvpnctl set split-app bypass:/usr/lib/firefox/firefox
To add apps you wish to use the VPN, run the command:
expressvpnctl set split-app vpn[ROUTE TO FOLDER WHERE THE APP IS LOCATED]
For example, if you wanted the VPN to bypass Firefox, you would run the command:
expressvpnctl set split-app vpn:/usr/lib/firefox/firefox
To delete split tunneling rules for an app, run the command:
expressvpnctl set split-app remove[ROUTE TO FOLDER WHERE THE APP IS LOCATED]
Need help? Contact the ExpressVPN Support Team for assistance.
Block ads, trackers, and harmful sites
Customize your online experience and take back control over what companies know about you. You can block ads, trackers, malicious sites, and adult content from within the ExpressVPN app.
A lot of the apps and websites you visit keep a record of and share your activity with third-party companies, including trackers, scammers, and malware sites. This information is used to serve you more targeted ads and content, usually without your knowledge or permission.
These advanced protection features prevent all apps and websites you visit on your device from communicating with the third-party companies in our open-source blocklists.
Advanced protection features are disabled by default. To enable all advanced protection features at the same time, run the command:
expressvpnctl set blockAll true
To disable all advanced protection features, run the command:
expressvpnctl set blockAll false
You can also enable and disable each advanced protection feature individually:
Block trackers
To block trackers, run the command:
expressvpnctl set blockTrackers true
To stop blocking trackers, run the command:
expressvpnctl set blockTrackers false
Block malicious sites
To block malicious sites, run the command:
expressvpnctl set blockMalicious true
To stop blocking trackers, run the command:
expressvpnctl set blockMalicious false
Block ads
To enable the ad blocker, run the command:
expressvpnctl set blockAds true
To disable the ad blocker, run the command:
expressvpnctl set blockAds false
Block adult sites
To enable the adult site blocker, run the command:
expressvpnctl set blockAdult true
To disable the adult site blocker, run the command:
expressvpnctl set blockAdult false
Read more about ExpressVPN’s advanced protection features.
Need help? Contact the ExpressVPN Support Team for assistance.
Enable (or disable) Internet Kill Switch
Internet Kill Switch is enabled by default.
To disable it, enter the following command:
expressvpnctl set networklock false
To re-enable Internet Kill Switch, run the command:
expressvpnctl set networklock true
Need help? Contact the ExpressVPN Support Team for assistance.
Sign out of your account
To sign out of your ExpressVPN account on the ExpressVPN app for Windows, run the following command:
expressvpnctl logout
Need help? Contact the ExpressVPN Support Team for assistance.