Share via



Applies To: Windows 7, Windows Server 2008 R2, Windows Server 2012, Windows 8

Connects or disconnects a dial-up or virtual private network (VPN) connection. When you run the command without parameters, the status of current network connections is displayed.


rasdial entryname [username [password|*]] [/domain:<domain>] [/phone:<phonenumber>] [/callback:<callbacknumber>] [/phonebook:<phonebookfile>] [/PrefixSuffix]


  •  EntryName
    Required when connecting to a phonebook (.pbk) entry. Specifies an entry in the current .pbk file, located in the systemroot\System32\Ras folder. If the ConnectionName contains spaces or special characters, use quotation marks around the text (that is, "Connection Name").

    The Rasphone.pbk file is used unless the Personal Phonebook option is selected. If the Personal Phonebook option is selected, the file UserName.pbk is used. The name is shown on the Rasphone title bar when Personal Phonebook/p is selected. Numbers are appended if name conflicts occur.

  •  UserName[{ Password| *}]
    Specifies a user name and password with which to connect. If an asterisk is used, the user is prompted for the password, but the characters typed do not display.

  •  /domain: Domain
    Specifies the domain in which the user account is located. If unspecified, the last value of the Domain field in the Connect To dialog box is used.

  •  /phone: PhoneNumber
    Substitutes the specified phone number for the entry's phone number in Rasphone.pbk.

  •  /callback: CallbackNumber
    Substitutes the specified callback number for the entry's callback number in Rasphone.pbk.

  •  /phonebook: PhonebookPath
    Specifies the path to the phonebook file. The default is systemroot\System32\Ras\UserName.pbk. You can specify a full path to the file.

  •  /prefixsuffix
    Applies the current TAPI location dialing settings to the phone number. These settings are configured in Telephony, which is located in Control Panel. This option is turned off by default.

  •  /disconnect
    Required when disconnecting. Disconnects the specified entry. You can also disconnect by typing /d.


The following Rasphone.exe features are not supported with rasdial:

  • Entries that require Terminal mode user entry during the dial sequence

  • Operator-assisted or manual dialing


In the following example, this command connects to the OFFICE entry in Rasphone.pbk:

         rasdial office       

In the following example, this command connects to the OFFICE 2 entry in Rasphone.pbk and specifies a callback number:

         rasdial "office 2" /callback:555-0100       

In the following example, this command disconnects from the EAST OFFICE entry:

         rasdial "EAST OFFICE" /d