Skip to contentGo to the directory tree
FolderRisk: Caution

ras C:\Windows\System32\ras

C:\Windows\System32\ras: Remote Access Service (RAS/RRAS) components. VPN connections live in the .pbk phone books under ProgramData and AppData.

Updated on By AltF4 Formation

What it’s for

System32\ras is part of the system components of RAS (Remote Access Service, built into RRAS), which manages remote access connections: VPN, modem, incoming connections. It is not specific to servers, since Windows clients use it for their VPN connections too. This is not where to look for your connections.

What it contains

RAS service components, which vary with the installed roles. The connections themselves are described in rasphone.pbk phone books:

  • %APPDATA%\Microsoft\Network\Connections\Pbk for the user.
  • %ProgramData%\Microsoft\Network\Connections\Pbk for all users, with a _hiddenPbk subfolder for connections created by applications.

A phone-book entry holds phone numbers or the server address, bit rates, authentication information and other connection parameters.

Risks and best practices

  • .pbk files describe remote access, so treat them as sensitive data and do not share them.
  • Create, edit and export a connection from Settings > Network & internet > VPN or with the VPN cmdlets, not by copying files.
  • On an RRAS server, keep write access to this folder to administrators.
  • To troubleshoot a RAS connection, turn tracing on with netsh ras set tracing * enabled: the files are written to C:\Windows\tracing.

Useful commands

Fenêtre de terminal
# VPN connections of the user and of all users
Get-VpnConnection
Get-VpnConnection -AllUserConnection
# Active remote access connections
rasdial
# All-users phone book
Get-Content "$env:ProgramData\Microsoft\Network\Connections\Pbk\rasphone.pbk" -ErrorAction SilentlyContinue

Report a mistake