Share via


Connect to a network in Windows Vista and Windows Server 2008

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

You can use this procedure to connect a computer that is running Windows Vista or Windows Server 2008 to a network using a wireless, wired, VPN, or dial-up connection. After you establish the connection, you can access resources on the remote network according the permissions that are granted to you by the administrator on that network.

Connections that appear in the Connect to a network page include:

  • Wireless networks. Windows does not automatically connect your computer to a wireless network until you configure the connection with any required security information, and then specify that the network is to be connected automatically.

  • Dial-up and VPN connections that you have defined. Windows connects to these networks only when you specify the connection type. You can configure one of your dial-up or VPN networks as a default auto-dial network.

  • Connections created with the Connection Manager Administration Kit (CMAK). These are administrator created and distributed connection profiles that can include advanced security features and customization for a specific organizational network. For more information about CMAK, see Additional Resources.

Any user account can be used to complete this procedure.

You can use the following methods to connect to a remote network:

  • To connect to a network by using the Windows interface

  • To connect to a wireless network by using a command prompt

  • To connect to a dial-up network by using a command prompt

  • To connect to a VPN by using a command prompt

To connect to a network by using the Windows interface

  1. Right-click the Network icon () in the notification area, and then click Connect to a network.

  2. Filter the list of connections to include only those of the type you want by selecting the type from the Show list. You can select Wireless, Dial-up and VPN, or All.

  3. Select your connection in the list of available connections.

  4. Click Connect.

  5. If the connection you select requires additional information, such as a user ID and password, or a Wired Equivalency Privacy (WEP) or Wi-Fi Protected Access (WPA) security key, Windows prompts you for the required information. After you supply all required information, the connection is completed.

Additional considerations

  • You can also start the Connect to a network page by clicking Start, and then clicking Connect To.

  • If you just created the connection, you might need to click the Refresh button located above and to the right of the list of available connections.

  • If you are prompted for credentials, and you want to log on to a domain, type your user name and the domain name in one of two ways:

    • Your user principal name prefix (your user name) and your user principal name suffix (your domain name), joined by the "at" symbol (@). For example, user@sales.contoso.com.

    • Your domain name and your user name, separated by the backslash (\) character. For example, sales\user.

    Note that the suffix in the first example is a fully-qualified Domain Name System (DNS) domain name. Your administrator might have created an alternative suffix to simplify the logon process. For example, creating a user principal name suffix of "contoso" allows the same user to log on by using the much simpler user@contoso.com.

    Instead of having to type your domain name, you can also configure your connection to include your logon domain in the **Connect **ConnectionName dialog box, as follows:

    1. Click Properties if the button is enabled.

    2. On the Options tab, select the Include Windows logon domain check box.

After connecting to a remote network, you might not be able to see all computers on your local network. This is because after you connect, your remote connection becomes your default path for network routing. Consequently, you see computers on the remote network, and you see other computers on the same LAN segment to which your computer is connected. But you cannot communicate by using computers on networks that were previously reached through a router on your local LAN.

You can use the netsh command to connect to and disconnect from wireless networks for which you have defined profiles.

To connect to a wireless network by using a command prompt

  • At a command prompt, type the following, and then press ENTER:

    netsh wlan connect profilename [ssid=ssid] [interface=placeholder]

Parameter Description

profilename

Specifies the profile name of the wireless network connection. To see a list of the currently available profiles, type:

Netsh wlan show profiles

ssid=ssid

Specifies the Service Set Identifier (SSID) of the wireless network. This parameter is only required if the profile contains more than one SSID. The SSID is the identifier for the wireless network to its clients. All networks within range of each other must have unique SSIDs, or else clients will have difficulty connecting.

interface=interface

Specifies the interface to use to connect to the wireless network. This parameter is only required if more than one wireless network adapter is available on the computer. To see a list of the available interfaces, type:

Netsh wlan show interfaces

Formatting legend

Format Meaning

Italic

Information that the user must supply

Bold

Elements that the user must type exactly as shown

Between brackets ([])

Optional items

Additional considerations

  • To open a command prompt, click Start, click All Programs, click Accessories, and then click Command Prompt.

You can use the rasdial command to connect to and disconnect from dial-up connections to remote networks for which you have defined profiles.

To connect to a dial-up network by using a command prompt

  • At a command prompt, type the following, and then press ENTER:

    rasdial ProfileName [user name[password|*]] [/domain:domain] [/phone:PhoneNumber] [/callback:CallbackNumber] [/phonebook:PhoneBookFile] [/prefixsuffix]

Parameter Description

ProfileName

Specifies the profile name of the remote network connection.

user name[password|*]

Specifies a user name and password with which to connect. If an asterisk is used, the user is prompted for the password, but Windows does not display the characters typed.

/domain:domain

Specifies the domain in which the user account is located.

/phone:PhoneNumber

Substitutes the specified phone number for the phone number included in the profile.

/callback:CallbackNumber

Substitutes the specified callback number for the callback number included in the profile.

/phonebook:PhoneBookFile

Specifies the path to the file containing the profile. When you create a connection profile, Windows stores it at %userprofile%\appdata\roaming\microsoft\network\connections\pbk\rasphone.pbk, which is the default path if you do not specify this parameter.

/prefixsuffix

Applies the current dialing location rules to the phone number. These settings are configured in Phone and Modem Options, which is located in Control Panel. This option is not enabled by default. For more information about dialing rules, see Change How Windows Dials Phone Numbers.

Formatting legend

Format Meaning

Italic

Information that the user must supply

Bold

Elements that the user must type exactly as shown

Between brackets ([])

Optional items

Additional considerations

  • To start a command prompt, click Start, click All Programs, click Accessories, and then click Command Prompt.

  • If you are using Connection Manager profiles that were created by using the Connection Manager Administration Kit (CMAK), these profiles cannot be started from a command prompt. CMAK profiles cannot be started from a command prompt because specific features of a CMAK profile can require user interaction through a graphical interface.

You can use the rasdial command to connect to and disconnect from VPN connections to remote networks for which you have defined profiles.

To connect to a VPN by using a command prompt

  • At a command prompt, type the following, and then press ENTER:

    rasdial ProfileName **[**user name [password|*]] [/domain:domain] [/phone:FQDNorIP] [/phonebook:PhoneBookFile]

Value Description

ProfileName

Specifies the profile name for the connection to the remote network.

user name[password|*]

Specifies a user name and password with which to connect. If an asterisk is used, the user is prompted for the password, but Windows does not display the characters typed.

/domain:domain

Specifies the domain in which the user account is located.

/phone:FQDNorIP

Substitutes the specified fully qualified domain name or IP address for the name or address included with the profile.

/phonebook:PhoneBookFile

Specifies the path to the file containing the profile. When you create a connection profile, Windows stores it at %userprofile%\appdata\roaming\microsoft\network\connections\pbk\rasphone.pbk, which is the default path if you do not specify this parameter.

Formatting legend

Format Meaning

Italic

Information that the user must supply

Bold

Elements that the user must type exactly as shown

Between brackets ([])

Optional items

Additional considerations

  • To open a command prompt:

    • On Windows Vista, click Start, click All Programs, click Accessories, and then click Command Prompt. You can also type cmd in the Start Search box.

    • On Windows Server 2008, click Start, and then click Run.

  • Connection profiles created with CMAK cannot be started at a command prompt. Specific features of a CMAK profile can require interaction from the user through a graphical interface.

See Also

Concepts

Connect to a network
Manage Network Connections