NetworkInformation.GetConnectionProfiles Method


Gets a list of profiles for connections, active or otherwise, on the local machine.

 static IVectorView<ConnectionProfile ^> ^ GetConnectionProfiles();
 static IVectorView<ConnectionProfile> GetConnectionProfiles();
public static IReadOnlyList<ConnectionProfile> GetConnectionProfiles();
function getConnectionProfiles()
Public Shared Function GetConnectionProfiles () As IReadOnlyList(Of ConnectionProfile)




An array of ConnectionProfile objects.


The following example demonstrates how to retrieve a ConnectionProfile. The function calls getConnectionProfiles to retrieve all available connections on a device and display using a list. Alternatively, your app can call getInternetConnectionProfile to retrieve the ConnectionProfile representing the connection currently used for Internet connectivity.

Note For the implementation of the getConnectionProfileInfo method in the code below, and for additional examples of how NetworkInformation class methods are implemented to retrieve connection profiles, see Quickstart: Retrieving network connection information.

function DisplayConnectionProfileList() {
    var profileList = "";
    var ConnectionProfiles = networkInfo.getConnectionProfiles();
        if (ConnectionProfiles.length !== 0) {
            for (var i = 0; i < ConnectionProfiles.length; i++) {

                //Display Connection profile info for each profile by passing it
																//to a function that accesses and displays the connection properties
                profileList += getConnectionProfileInfo(ConnectionProfiles[i]);
                profileList += "-------------------------\n\r";
        else {
            mySample.displayStatus("No profiles found");

    catch (e) {
        mySample.displayError("Exception Caught: " + e + "\n\r");

Applies to